It would depend if the last word is "l'mayim" (indefinite) or "lamayim" (definite). Both are fine in both languages.
Indeed, we use both in English depending on what we want to communicate in a given context/situation. It's most important then to accurately understand the ideas that are communicated by the Hebrew expression and then to translate that accordingly whenever possible. That's in large measure how Duolingo gagues comprehension.
Couldn't you also say "הכלב נפל במים" or is "ל" the required preposition?
That's a really good question. The phrase "נפל ב" is used for many things especially when the subject falls, for example, in some kind of situation, state, circumstance, or location (e.g., "in the bathroom", "in the shower", "in the woods", "in battle", and "in love") or perhaps sometimes when the location or object they fall into is conceptualized as some kind of container (or at least a location), even if it's only partially enclosed (e.g., "in a/the pot"). I'd want to investigate more examples of the latter.
That said, there does seem to be a strong tendency(/affinity/preference) for using prepositions like "ל" and "לתוך" when paired with (bodies of) water, which would be closer to English prepositions such as "to" and "into", which indicate a direction along a trajectory to/into some kind of a goal, destination, or reference point/location (including a container). Anyway, I'm sure a native Hebrew speaker could give a quicker, more definitive answer with examples. The difficulty is that preposition use and established phrases/constructions don't always overlap perfectly between languages. Hebrew often doesn't even use a preposition with locations/destinations (similar to an English example like "I'm going home").
Reverso provides some interesting examples: https://context.reverso.net/translation/english-hebrew/fell+in+water https://context.reverso.net/translation/english-hebrew/fell+in
It might also be helpful to see what kind of verbs and phrases tend to occur with "במים" (or vice-versa): https://context.reverso.net/translation/hebrew-english/במים