Navy is equipped with AIS, its up to the CO if and when he wants to transmit. But we always at least listen passively. With CO’s I’ve sailed with probably about 50% of the time we transmitted AIS, but when we do we don’t include information like next port of call, etc.
Also, its not hard to call up the warship on VHF. I had a CO once when I was a deck cadet break out a signaling lamp, but it was only after we had tried everything else AND we did it while there was still plenty of time for us to maneuver and avoid the contact ourselves.