Of course, the ultimate test is finding a major river and then damming that using its own water.
The real question is whether or not it works for oceans.
Not only might it work for oceans, but it would also allow you to let the ocean back in around the under water fort you build where the ocean isn't, without any sign of wall or dam.
Let's assume a 3 z-level ocean.
We install the top set of pumps around the edge, just above the top layer of the ocean. This will keep additional water from the top layer from being added. Now we just need to get rid of the water in the middle of the top layer. I've never used an automated bridge to destroy water, but I guess that would work. Just make a drain from the top layer of the ocean into your water-destroying room or complex.
Once this is done, water in the ocean would only exist at the edges where it is being picked up by the pumps and put back by the pumps. So, set a little inside these pumps, we build another series of pumps that do the same thing for the next layer down, and drain the middle of the next layer in the same fashion.
Repeat for the third layer.
We build Lab of the Seas or whatever in the middle, then we turn off the third and bottom layer of pumps. This allows the third and bottom layer of the ocean to refill. We then take those pumps apart, as well as whatever they're built on.
Repeat for the second and first layers of the ocean.
The only sign of the dike are the partial rings of stones or blocks at the bottom of the ocean.
This is all assuming that the water-generating edges of the ocean do not pressure-flood the middles of the second and third layers of the ocean while the pumps are running. I'm not sure an ocean would allow this, at all. But there it is for whatever it's worth.