Short answer: No, but because that isn't what's happening.
The behavior you're experiencing is not what you think. Your browser uses middle click to open links in a new tab, however this is still interpreted by the site as a click. The site is not really aware that you are trying to open something in a new tab, so it just does whatever it normally would for a click.
When you click an image on Facebook and it pops up in a black box you haven't actually opened a new page, instead you just opened up another part of the one you were already on. Middle click will not change that, as this is an integral part of the way the page functions. Middle click may still open a page in a new tab, but this is the same page as you were already on, not a new page at all.
This is a newer design pattern, many sites are attempting to reduce page loads by showing content in one page, and dynamically fetching new content (using a technique called AJAX) and repopulating the page using JavaScript. A site like this has a more fluid UX, and for most people will be easier to use.
So can you disable this? Technically... yes, a complex user script could tear apart the page and remake it in the way you want it. But that's a lot of work without a whole lot of benefit. The websites developers put a lot of time into making it work the way it does, you would essentially need to rewrite the entire front end to make it behave the way you are describing. Again, this is not the site subverting the browser action in any way, the site is not doing anything wrong. What is happening is that lots of sites are now being designed in a way that doesn't fit the usage pattern you are familiar with. You can try disabling JavaScipt completely, but this is more likely to make the site unusable than to be helpful. Most major websites do try to make sure they don't break when you do this, but there are no guarantees.
Now I said the site isn't aware of which button you clicked, this is generally true, but it is possible for the site to find out. This question from Stack Overflow addresses the how: How to detect middle mouse button click?. The basic answer is that when a click event is fired, information about which button was clicked is available, and that can be used to determine how to handle the event. But most websites do not use that information, those that do are most likely games or other special kinds of interactive content.