yes it is absolutely discouraged/forbidden. There is no good way to get dissolved drugs out of the water at the wastewater treatment plant so it really just stays in the treated water.
I would hold on to the pills till they expire as long as you can safely store them. Then you can take them to the poilce station.