The under-the-riverbed idea is my most favourite now, but I have more experience with damming the rivers using pumps. If the river is narrow, 4-5 tiles, then one pump over the water is enough, close to the middle of the river. I build a pumpstack powered by windmills in the form of a water tower. The water taken can be used to fill firefighting systems (aqueducts with mechanised hatches over sensitive areas), water cannons or just be destroyed. You don't even need a big repeating smasher for it, a medium to small one is enough. Like 5x5 for 4-5 wide river, you probably want more or bigger ones for wider rivers, double or triple repeating smashers are better than big one if you use levers.
The idea is that the pumps empty the river and fill the tower. The tower acts as a buffer in case lever pulling dwarf goes to loo, then before next one arrives the tower takes the water. Repeater destroys water faster than the pumps can fill the tower.
There is one thing which is good to remember if you want your water clean: a bug with river changing to stagnant still exists. It is preventable if you use pump, but in other methods it is likely that all you river downstream, and several tiles upstream will turn into stagnant, if you try to channel water out. Of course the water taken can be purified with a pump, but the river and all water sources over it remain stagnant.