If you're wrong about the purpose being for diving, most of the rest of what your describing matches Joe Haldeman's The Forever War (1973).
In the story the soldiers of Mandella's unit are implanted with a fitting near their hip for the removal of a fluorocarbon breathing liquid. The purpose, however, isn't for diving, it's so they can be put into suits and pressurized to a very high degree in order to survive 25g (and later higher) accelerations that would otherwise kill them.
The acceleration shells arrive about a third of the way through the story, but how they work isn't fully explained right away.
The acceleration shells were something new, installed while we rested and resupplied at Stargate. They enabled us to use the ship at closer to its theoretical efficiency, the tachyon drive boosting it to as much as 25 gravities.
[...]
The shell is like a flexible spacesuit; at least the fittings on the inside are pretty similar. But instead of a life support package, there's a hose going into the top of the helmet and two coming out of the heels, as well as two relief tubes per suit. They're crammed in shoulder-to-shoulder on light acceleration couches; getting to your shell is like picking your way through a giant plate of olive drab spaghetti.
They work by filling the lungs (and all other air cavities of the body) with fluid to prevent tissues from collapsing.
Takes a lot of hypno-conditioning to lie there and have oxygenated fluorocarbon forced into every natural body orifice and one artificial one. I fingered the valve fitting imbedded above my hipbone.
Even the cat that some of the soldiers pick up is prepped for liquid breathing:
The cat raised its head enough to hiss half-heartedly at me, then returned to its flaccid repose.
I looked at Charlie and he shrugged back. "It seems kind of cruel," he said. To the sergeant: "You won't get much use of it. After twenty-five gees, it'll be just so much fur and guts."
"Oh no, sir! Sirs." He ruffed back the fur between the creature's shoulders. It had a fluorocarbon fitting imbedded there, just like the one above my hipbone.
The entire room acceleration shells are in is filled with fluid and pressurized:
When the lights in my helmet showed that everybody was suited up, I pushed the button that flooded the room. No way to see, of course, but I could imagine the pale blue solution-ethylene glycol and something else-foaming up around and over us. The suit material, cool and dry, collapsed in to touch my skin at every point. I knew that my internal body pressure was increasing rapidly to match the increasing fluid pressure outside. That's what the shot was for; keep your cells from getting squished between the devil and the deep blue sea. You could still feel it, though. By the time my meter said "2" (external pressure equivalent to a column of water two nautical miles deep), I felt that I was at the same time being crushed and bloated. By 2005 it was at 2.7 and holding steady. When the maneuvers began at 2010, you couldn't feel the difference. I thought I saw the needle fluctuate a tiny bit, though.
Once maneouvering is over people have to decompress, get out of their shells, clear their lungs and get moving again:
The place sounded like an asthmatics' convention in the middle of a hay field: thirty-nine people and one cat all coughing and sneezing to get rid of the last residues of fluorocarbon.