The official state news agency IRNA said 53 people had also been wounded and that many were in a critical condition.
Washington has said it is ready to open talks on a new agreement to replace the July 2015 accord, but Tehran has said repeatedly it can not negotiate under the pressure of the sanctions.
Foreign Minister Mohammed Javad Zarif blamed the bloodshed on "regional terror sponsors", language that usually refers to Iran's enemies Saudi Arabia and Israel, and "their USA masters", and vowed that Tehran would respond decisively.
Yahya Rahim Safavi, a senior Iranian Revolutionary Guards official, has vowed retaliation for the attack.
Tehran has blamed the attack on "regional terror sponsors and their U.S. masters".
"Iran will respond swiftly and decisively in defence of Iranian lives", he wrote on Twitter. Al-Tostari said the attack undermined the Iranian government "on the day it wants to give a message to the world that it is powerful and in control".
The assault by alleged militants marks one of the deadliest attacks in Iran in years and threatened to raise tensions in a region already plagued by turmoil.
The parade in Ahvaz, a city with a population of more than a million people, was one of many happening nationwide in honor of Sacred Defense Week, marking the 38th anniversary of Iran's 8-year war with Iraq.
Three of the terrorists were shot dead at the scene while a fourth was arrested and later succumbed to his wounds, armed forces spokesman Brigadier General Abolfazl Shekarchi said.
Yacoub Hor al-Tostari, a spokesman for the Arab Struggle Movement to Liberate Ahvaz, later told The Associated Press that members of an umbrella group of Ahvazi activists his organization leads carried out the attack.
The separatist group the Patriotic Arab Democratic Movement in Ahwaz claimed responsibility for this attack.
Iranian Foreign Minister Mohammad Javad Zarif also appeared to blame rival Riyadh for the attack.
However neither group provided evidence to show they were involved.
The judiciary-linked Mizan news agency said several of the accused were Iranians who had left to join IS in neighbouring countries and then returned.
The semi-official Fars news agency, which is close to the Guard, meanwhile said two gunmen on a motorcycle wearing khaki uniforms carried out the attack.
State television blamed "takfiri elements", a reference to Sunni Muslim militants, for the attack.
"Eight to nine of the military forces were martyred and more than 20 were injured".
Islamic State jihadists said via their propaganda mouthpiece Amaq that "Islamic State fighters attacked a gathering of Iranian forces" in Ahvaz, but the claim could not be verified and many recent IS claims have proved false.
Ahvaz, in southwestern Khuzestan province, is home to the small Arab minority in Iran, which is mainly ethnic Persian, and has been the site of sporadic unrest.