Can water pressure ever be high enough to trap gas bubbles or keep them from surfacing?

The highest pressure in the ocean is at the bottom of the Mariana trench, where the pressure is 1 086 atmospheres. Using the online calculator for the properties on nitrogen at 4 °C and 1 000 atmospheres the density comes out as 602 kg/m³, which is still less than water. So a bubble of nitrogen would rise even at the deepest point in the ocean.

Response to comment:

In principle we can continue increasing the pressure and the nitrogen should get denser. However at temperatures above 0 °C and the sorts of pressures we are talking about, nitrogen is a supercritical fluid so it does not obey anything like an ideal gas law. Calculating at what point the density would exceed the density of water is far from easy.

The effect of pressure on water is straightforward. At sea bottom temperatures (about 4 °C) the density of water increases only slowly with pressure to about 1 050 kg/m$^3$ at 6 000 atmospheres, at which point the water freezes to form ice V. So the question is whether the density of nitrogen exceeds 1 050 kg/m³ below a pressure of 6 000 bar.

I can’t find any figures for the density of nitrogen at these sorts of pressures and temperatures, though I did find this paper that gives a Mie-Grüneisen type equation relating the density, pressure and temperature. Unfortunately the preview only shows two pages and the rest of it is behind a paywall. However using the figures they give and waving my arms around a bit I find the density of nitrogen rises to 1 050 kg/m³ at around 4 000 atmospheres.

So, it might just be possible to get a nitrogen bubble that is denser than water and will sink instead of floating. But I don’t know whether the equation from the paper I cited is accurate at these sorts of pressures and temperatures, and it’s possible the nitrogen will solidify before the water does (though I’d guess not).