Promising wastewater treatment using rare earth-doped nanoferrites