Flow maps will do this, but if you have a river thats set up as a mesh on a spline, the spline will already take the water in a specific direction complete of bending.
The two should be used in conjunction really.
To have it go around rocks and geometry you can output the mesh distance fields into the flow map (properly adjusted for it), and it will work.
Further, you can levarage vertex paint to offset the flow map some more - but doing so obviously has less of an effect than the other options.