Hello,
To put it plainly: you can't.
ikkez's Flash plugin (afaik) uses php sessions to show a flash message on your template on the next request. If that's what you want, you can just set the flash message on whichever script you're calling on your ajax request.
But If you want to show a flash message from an ajax call, I'm assuming you'll want to show the message immediately after the call is made and not only when the visitor reloads or changes the page.
And on that case, you should simply use javascript to show a flash message on the success/error callbacks of your ajax request.
Of the top of my head, an example for a very basic flash message in jQuery would look something like this:
$('body').prepend('<div class="someflashclass">Message here</div>'); // this will add the div with class "someflashclass" as the first element after the <body> tag.
setTimeout(() => { $('.someflashclass').remove() }, 3000); // this will remove the flash div after 3 seconds
You can also surely find a few plugins that will offer flash message functionality if you prefer. Just search the web for something like "jquery flash message plugin"
Hope it helps.
Cheers