There are two boats full of people in a river, one is stopped and the other is moving.
There are two boats on a river.
one boat is moving and other stopped in the river, both full of people
The boats being in a river is the same as on a river.
boats full of people in a river is inferred as boats on a river.