To put it simply, it's not something you can just do, like that. AJAX actions are those actions which use javascript to go and fetch some content from the server without having to reload the page and go to another URL.
Most simple example of this is clicking on an avatar to open the member card.
If a user is IP banned and they click on someone's member card, they will see the error exactly how you showed it in your screenshot.
My point is, if you have seen this anywhere, it's not an add-on. It's just how XF displays the error message in certain situations. It's unlikely an add-on already exists for such a thing.