A couple of points for consideration.
In the various DF books, a fairly significant amount of running/flowing water can ground out magic. I would need to double check, but I believe that Harry mentioned at least the volume of a small stream in Storm Front. Essentially what happens is the water absorbs and carries off some/all of the energy in the magic.
Harry has also mentioned that magic doesn't travel over/across bodies of water all that well. Examples of that come from White Night when Harry cast a tracking spell to locate someone on a boat which was docked in Lake Michigan. Harry mentioned that he knew that the person was docked fairly close to shore, since the magic of his tracking spell wouldn't travel out very far over the water. For some reason, a distance of about 100 yards for the tracking spell comes to mind. Also, most bodies of water do have some form of flow or current, so even large bodies of water are virtually never still/stagnant.
Now, if the question here is about whether or not a caster can do magic aboard a ship on the water, then the question becomes what sort of effect are they trying to have? If the ship is fairly large, like a cruise ship, container ship, or supertanker, and the spell is supposed to effect someone/something which is also on the ship, then I wouldn't really think that water would impact the spell. After all, the magic isn't actually traveling over open water to get from Point A to Point B on the same ship. Now, if the caster was targeting something on another ship nearby, then I would absolutely take the intervening distance over the water between the vessels into account.