To be clear, a literal translation using "by" – The horses walk *by [i.e. next to] the water – would be incorrect here.
In essence, "door" always means "through". When it is translated as "by (means of)", as in the passive voice, that's an abstract use of the concept "through": think "X is done by Y" ~ "action X is passed through tool/agent Y".
Sometimes "door" can also be translated "throughout", as in "door de week".
Without further information, that implies they are walking next to the river. The Dutch original here has ambiguity in the other dimension – the horses are clearly getting their hooves wet, though it's only implied that they are crossing, not following the water.
To describe with the least amount of ambiguity that the horses are walking in the water parallel with the current, I'd probably use "in" in both languages.