Method for pretreatment of wastewater and recreational water with nanocomposites