But at the same time, ATC told him to follow the river, while in its trajectory he was crossing it. Did he do a wrong maneuver that made him go in the wrong direction form the start? Or was ATC that didn't give the information correctly?
The river visual is a published approach for DCA. P-56 (the restricted airspace the pilot almost penetrated) is VERY well known and would top of mind for anyone flying in that airspace - not to mention highlighted on paper charts, EFBs, and panel-mount GPSes.
This is basic preflight planning. The pilot didn't adequately prepare, given the complexity of the airspace they were flying in.
ATC isn't there to micromanage your flight. They don't need to tell you to avoid restricted airspace, it's implied.