Some states would allow it with certain restrictions; other states forbid it. It'll depend on exactly where you are and what local and state restrictions obtain.
Even in the two states that allow it that I am familiar with, they would not permit dumping a standard RV gray water tank. The reason is that some of the gray water passes through the kitchen sink, and water via kitchen sinks has been shown to contain an unacceptable level of bad bacteria. (It's probably because food scraps often become lodged in the trap below the kitchen sink.)
However, if your rig has two gray tanks, and one of them is not connected to the kitchen sink, then water from that tank could be drained, again with restrictions.
Times have changed a lot. Prior to the early 70s, RVs didn't have gray tanks at all.
:)
Lynn