The Government and regulators breached the law by allowing water firms to discharge sewage outside of “exceptional circumstances”, the green watchdog has ruled.