There isn't a specific law that universally prohibits dumping water into the ocean, as the legality of such actions often depends on the contents of the water and the jurisdiction in question. However, various environmental laws and regulations at national and international levels address the dumping of waste and pollutants into oceans.
One prominent example is the Marine Protection, Research, and Sanctuaries Act (MPRSA) in the United States, which prohibits the dumping of certain materials into U.S. waters and requires permits for the dumping of other wastes. Under this law, individuals or organizations found to be dumping prohibited substances can face penalties, including fines.
Additionally, the London Convention and its Protocol — international agreements focused on the prevention of marine pollution — set guidelines for the dumping of waste at sea. Countries that are signatories are expected to adhere to these guidelines, which include strict controls on what can be dumped.
If you're interested in a specific country or jurisdiction, laws and regulations may vary, so it might be useful to consult local environmental protection agencies or legal resources specific to that area.