Rouhani’s hardline rivals have accused the government of doing too little, too late.
In a meeting broadcast on state television, the president said: "When a city goes under water because of a flood and neighborhoods face this problem, removing the water is a difficult, heavy task."
The head of the judiciary, Ebrahim Raisi, said that officials who mishandled the disaster and caused the death of civilians could face prosecution, Fars news agency reported.
At least 23 people have been confirmed dead, officials said, and more than 200 sustained injuries.
The flood has blocked a highway in eastern Tehran, state media said.
Videos posted on social media showed cars driving in flooded roads in southeast districts of the capital. Reuters could not verify the authenticity of the videos.
Iran is celebrating the Nowrouz new year holidays, a time when many families travel around the country, but police asked people to avoid unnecessary journeys.
State television said several villages near rivers and dams in different provinces had been evacuated.
Tens of thousands of people have been displaced, and thousands put in emergency shelters provided by the government, state media said.
The country's crude oil pipelines have avoided damage from flooding and the transfer of oil is taking place normally, Iranian Oil Pipeline and Telecommunication Co director Abbasali Jafarinasab was quoted as saying by the oil ministry's SHANA news website.
The United Nations Office for the Coordination of Humanitarian Affairs (OCHA) said in a statement that it was ready to offer help to Iran, but "challenges caused by unilateral sanctions will affect the UN response and the accountability of UN to deliver the appropriate support."
U.S. President Donald Trump last year abandoned a 2015 nuclear agreement between Iran and six world powers, and reimposed sanctions on Tehran.