For boats, the idiomatic preposition is on or on board.
As the ship ran aground on the jagged rocks, everything that was on board flew into the water, including the hapless sailors.
You can talk about items that are in a particular part of the boat, though:
The delicate astrolabe that had been in the captain's cabin smashed through the stern windows and shattered on the rocks below.
You can also use at to describe objects that were at a particular place on the boat:
The elaborately carved mermaid figurehead at the bow of the ship snapped off, but otherwise escaped unscathed.
Side note: In case you are unfamiliar, in English, there are different terms for the directions on a nautical vessel. To the right is starboard, to the left is port, to the back of the ship is aft, and the front fore. The front part of the ship is called the bow, and the rear the stern.
There are many other terms, if you are curious.