The Ruling on Treated Wastewater: Purity and Permissibility of Use
Regarding treated wastewater - if this contaminated water is treated and purified, and no trace of the color or smell of impurity remains, it becomes pure. As for the ruling on using it, that depends on what doctors determine regarding removal of harm - a separate issue from ritual purity. It is pure as long as no trace of impurity remains. As for use, that depends on what the doctors determine - if they establish there is no harm, there is no problem using it; if they establish there is harm, then it should be avoided for eating or internal consumption, but can be used elsewhere, based on the general principle of the Shari'ah: "no harm and no reciprocating harm."
