There is no universal minimum safe distance.
This is a waterfall:
This is also a waterfall:
Depending how you count it, this might also be a waterfall:
The first, you could stand in the water with no adverse consequences. The latter two will kill you.
If you're visiting that second one, where's safe to stand? Consider:
- what's likely to happen if you fall in? (you die.)
- how likely are you to fall in? (how slippery/steep/stable is the surface you're standing on?)
- how can you reduce the risk of that happening? (stand further away, find somewhere more stable or less slippery)
You're unlikely to deliberately visit the third kind, but you might come across them particularly in urban areas. Stay well away. Weirs are not built for humans, and they're far more dangerous than they look. They're often fast-flowing, deeper than you think, and there's often a hydraulic jump (circular current) downstream of them that will trap you and drown you if you fall in.
Water is dangerous, especially in large volumes and high speeds. Stay back, stay high, don't die.