It's certainly not the case with Amsterdam's canals. The water used to be flushed regularly, and dredging boats can frequently be seen pulling out bikes and other garbage. There's absolutely no foul odor coming from the water. It's not sterile, sure, but some areas are even safe to swim in.
I definitely would not advise you to swim in the Amsterdam canals. And if you do plan on doing something like that make very sure that you have a tetanus shot, don't have any open wounds and don't ingest any water.
I wonder… I mean of course it’s easy to imagine rivers going through large cities being dirty. But my understanding is most large cities do not dump sewage into rivers except in cases of major flooding.
And there’s also stuff like New York putting in all those clams to clean up a river or… something like that anyways.