At the depth of the typical ocean floor — about 3km — water is compressed to 98.2% of its sea-level volume. The Mariana Trench is just over 11km deep, producing a pressure of around 1100 atmospheres, so water there is compressed to around 94% of its sea-level volume.
So, the answer depends on whether your container is strong enough to contain 1100 atmospheres of pressure, or flexible enough to expand to 107% of its original volume when it is on the surface.

For comparison, the research submersible Alvin is able to resist up to 6 kilometres of depth with its 75mm thick, 2 metre diameter, titanium pressure sphere. There’s probably a significant safety margin on that, but if we take it as a standard, then we can expect that a 150mm (6″) thick titanium sphere of the same dimensions would resist the pressure at 11 km depth. Therefore, [edit: given that metals tend to have similar tensile and compressive strengths] one could reasonably expect the sphere to contain the same pressure. Or one could use the same thickness of titanium as Alvin and reduce the diameter by half to provide the same structural strength.
[Edit: I forgot about the stipulation of one gallon being brought up. The Alvin’s pressure sphere is about 1000 gallons in volume, so a sphere of one gallon would be about 20cm (8″) across, requiring titanium about 30mm (1.2”) thick to resist the pressure 11km down.]
Alternatively, one could construct, say, a round-ended cylindrical container of about the same volume out of thinner soft steel, allowing it to bulge slightly as it is returned to the surface. However, you should consult a structural engineer about the details of this design.
Either way, it certainly looks feasible to make a container that wouldn’t rupture to haul up your sample from the abyssal depths.
A cautionary tale:

The first deep ocean explorer, the Bathysphere, was a steel sphere lowered by a derrick to a depth of 900m in the 1930s. It was normally occupied by two explorers, able to look out one of the windows, while what they observed was illuminated by a light from another window. For the first dives the third window was plugged by steel, and it was intended that a film camera would be installed there on later dives.
When the plug was finally replaced with a window of three-inch-thick fused quartz, Beebe and Barton (see above photo) test-dived the Bathysphere unmanned.
When conducting an unmanned test of the Bathysphere with the third window installed, they found it almost entirely full of water. Realizing the immense pressure that the water must be under, Beebe ordered his crew to stand clear and began loosening the hatch’s bolts to remove the hatch himself. Beebe described the experience that followed this in his book Half Mile Down:
“Suddenly, without the slightest warning, the bolt was torn from our hands, and the mass of heavy metal shot across the deck like the shell from a gun. The trajectory was almost straight, and the brass bolt hurtled into the steel winch thirty feet [9.1 m] away across the deck and sheared a half-inch [13 mm] notch gouged out by the harder metal. This was followed by a solid cylinder of water, which slackened after a while into a cataract, pouring out the hole in the door, some air mingled with the water, looking like hot steam, instead of compressed air shooting through ice-cold water.”
After replacing the third window with the steel plug and conducting another unmanned test, the same problem happened again. Beebe later described what would have happened to him and Barton had they been inside the sphere on a dive during which it leaked. They would not have had time to drown: due to the immense pressure, “the first few drops of water would have shot through flesh and bone like steel bullets.”

The Bathysphere’s high-pressure jet caught by a daredevil photographer. Picture supplied by Steve Hammond in comments
So, be cautious with your experiments.