In 1998 I had a similar problem with the three cylinder version of you motor.
Mine is the MD17C.
It turned out to be the liner base O-ring on one of the barrels.
If that is the case, then you will have to take off the exhaust
manifold, then both cylinder heads. You will at that moment, probably see that one of the cooling chambers is not holding water. One will be full, and one will probably be empty.
The Volvo dealer in Aberdeen Scotland had the necessary equipment for the pressure testing, but the leak was apparent simply by pouring water into the gap between liner and barrell. He confirmed that.
I doubt if it is either of the cylinder head gaskets, but it might be.
With time, the cooling jacket O-rings get tired and can lose seal, particularly if the motor has been overheated at any time.
The cooling jacket O-rings are expensive when sourced from Volvo... they are about $70 for 4 of them, if I remember.
On re-assembly, you will need a top end gasket set and exhaust
gaskets. They are still available as a pattern set.
Don't do what I did and put one of the exhaust
gaskets on the wrong way round. The motor will start OK, but on shut-down, seawater drips out of the air filters.
I nearly wrecked the motor with that mistake, but still it runs perfectly, 12 years on.
You can do all of the remedial work with the motor still in the boat. You do not have to lift the motor out. When you lift the barrels, don't lose the "bumping clearance" shims, and don't mix them up. Don't mix up the barrels either. You shouldn't have to touch your pistons, unless they are scored, and it is not difficult (with help) to get the barrels on again. It is just fiddly. If you have to take the pistons off (and you should not need to), then get back in touch, because that really is a fiddle to get them on again (blowtorch and freezer stuff for me, at least).
It is a good motor, and very well built. The price of spare parts is outrageous, however.
Don't run the motor with water-laden oil, of course. the engine will not tolerate that for long.
You will probably have a lot of water in the sump, and if the motor is still in the boat, it will need to be sucked out. If the motor is out of the boat, it is a lot easier. It can take a wee while to get it all out. We managed by repeated oil changes with cheap oil, with the motor run hot, until it cleared.
Let us know how you get on.