Say a seaplane has ditched onto ocean or a very large lake due to engine failure. Is it possible to sail the plane to the shore using wind alone, similar to sailing a boat?
You can sail a seaplane, but there are a lot of considerations. For starters, it makes a big difference as to whether you're talking about a seaplane where the hull is in the water or a floatplane. A floatplane sitting up on its pontoons (floats) is more up in the wind, but it's also more susceptible to rough water because of its higher center of gravity.
My personal experience with sailing a floatplane was with a J-3 cub with an 85 horse engine on rivers and lakes. If we wanted to back onto the shore, we had to sail it since there was no reverse pitch propeller.
For purposes of explanation on how to do it, let's say that there's no wind, but we're on a river with enough current that the movement of the floatplane with the current when the engine is off gives the floatplane a wind relative to the water. Further let's say the river is flowing from east to west, and we want to back onto a beach on the north shore. We land and stop the engine upstream from the beach. As the floatplane drifts it will weathervane into the wind. Thus, with the controls neutralized, we'll be facing west and moving downstream in mid-river with the current, but not as fast the current because of the drag of the wind on the aircraft.
The rule of thumb is that you point the tail towards the shore you wish to get to. We do that by applying left rudder and right aileron. Thus we have increased the drag on the left wing, which will swing the nose left, and the left rudder will also swing the nose left. Thus the nose is now pointed a few degrees toward the left shore (south), the tail toward the right shore (north). The airplane will then sail to the right shore (north) relative to the direction the aircraft nose is pointing because the the aircraft is moving backwards relative to the water.
The trick in this instance is vary the control input to arrive at the downstream point you want. For practice, I used to have students sail to alternate sides of the river on Oregon's Willamette River downstream from the city of Eugene.
It's been done at least once before.
In 1925 a US Navy PN-9 landed in the Pacific when it ran out of fuel on the way to Hawai'i. The crew then rigged a sail from parts of the canvas wings and sailed their plane over 400 miles (in nine days) to reach the islands.
I know this is not what was asked, but I couldn't resist. There was indeed a seaplane that could be sailed: A sailplane with a seaplane hull. It was a curiosity and built only because none had been built before - or ever since.
DFS Seeadler floating on water (picture source). First flight was in 1935, and the official reasoning was to create a modern sailplane for clubs without access to a good airfield, but a lake nearby. But I guess the designer Hans Jacobs knew already how flimsy the official reasoning was: Below the keeled fuselage bottom was a wooden skid to allow landing on land.