Are these two events related? Not entirely.
As you say, Anatoly Dyatlov is asking people to go and make sure water is pumped into the core because he is under the illusion that the core is undamaged and that it needs water to prevent a classic meltdown. This is where (even when the fission reaction is shut down) the decay of unstable fission products generates enough heat over time to melt the fuel.
Akimov and Toptunov go and make sure water is running, by manually turning valves. However before the incident, there was some water already flowing through the core. Dyatlov has only issued this order because they can't tell through the control panels whether there is water or not flowing.
So with some of these valves already open, the explosion in the core is likely to have broken pipes and resulted in water spilling into the basement anyway. We see Akimov and Toptunov wading through some water to get to the valves.
Then there are the Firefighters. A large crew of Firefighters were trying to put out the fires in the building and (unknowingly) the reactor itself, and run a large number of hoses for a number of hours before its realized what dangers they are in. They are very likely to have contributed to the amount of water gathering under the reactor.
So (in my amateur opinion), there would likely have been a significant amount of water under the reactor anyway.