I am not defending the poster who suggested lying and hiding illness. At all.
However, we have Rx drugs, including antibiotics, with instructions as to when they are to be given. This includes diarrhea, although our instructions say we need to see blood or a few other specific indications. This was from a travel medicine clinic for a trip that included some areas where we were at risk of catching diseases that have symptoms including diarrhea. Honestly, I bring the meds and instructions wherever we go on vacation now, just in case.
DS2 threw up in a cruise ship pool a couple of years ago because he ate, swam and swallowed a bunch of water. He wasn't contagious, he had a quiet afternoon in the cabin and a few snacks before we had him back in contact with the general cruise population. I don't consider that irresponsible to other passengers, rather one of the things that happens when you travel with small children.
In the OP's situation, I too would try a few home remedies before going to the ship doctor, but I also wouldn't hesitate to divulge to the ship's medical authorities that we may have a communicable disease.