Watermills were widely used in times when river transport was even considerably more economically important than it is now. This sometimes led to conflict between these two uses of a river, e.g.
The Tang Dynasty (618–907 AD) 'Ordinances of the Department of Waterways' written in 737 AD stated that watermills should not interrupt riverine transport and in some cases were restricted to use in certain seasons of the year.[47] From other Tang-era sources of the 8th century, it is known that these ordinances were taken very seriously, as the government demolished many watermills owned by great families, merchants, and Buddhist abbeys that failed to acknowledge ordinances or meet government regulations. Wikipedia:Watermill
I would expect such conflict to be alleviated by a tendency for watermills to want to be located upstream (because they work better where the river is narrower and faster) and boats to want to be downstream (because they work better where the river is wider and slower), but clearly these considerations did not entirely prevent such conflict.
What about sailing ships? Compared to a raft, barge, rowing boat or canoe, an oceangoing sailing ship needs fairly deep water for the keel, and needs a fairly wide river to give it room to maneuver when tacking or dealing with changing wind.
Were any watermills historically located in stretches of river that were also used by sailing ships?