"The peoples of the region are defending themselves, and will continue to defend themselves, against the terrorists," Rouhani said in a speech marking the anniversary of the start of the 1980-88 Iran-Iraq war.
"The government and armed forces of the Islamic Republic of Iran will help them everywhere," he pledged.
"Iran is a cornerstone of stability in this sensitive Middle East region... Today dominated by unrest, security problems, massacres and fear."
Kerry "discussed the threat posed by (IS)" with his Iranian counterpart Mohammad Javad Zarif in a meeting in New York lasting more than an hour today, a US official said.
Also Read
Iran's supreme leader Ayatollah Ali Khamenei has said he rejected a US offer to join the international coalition it has been building against the jihadists.
Like Washington, Tehran has been providing support to both the Iraqi government and Iraqi Kurdish forces fighting IS.
Rouhani, who is to address the UN General Assembly on Thursday, last week criticised the United States for its refusal to send troops into combat in the battle against IS.
"Are they afraid of their soldiers being killed in the fight they claim is against terrorism?" he asked in an interview with NBC television.