Drinking water on ships is not a problem. They have water in bottles to buy or just use the ships water. The water on board is generally better tasting than your own hometown.
Ships have their own water purification systems as well as desalinization. The water is great. It's the water on shore that you shouldn't drink, and perfectly OK to refill bottles and take them with you.