"If the US withdraws from the nuclear deal, then we will not stay in it," Ali Akbar Velayati, foreign policy advisor to supreme leader Ayatollah Ali Khamenei, was quoted as saying by the state television website.
Trump has all but decided to withdraw from the 2015 Iran nuclear accord by May 12 but exactly how he will do so remains unclear, two White House officials and a source familiar with the administration's internal debate said on Wednesday.
There is a chance Trump might choose to keep the US in the international pact under which Iran agreed to curb its nuclear program in return for sanctions relief, in part because of "alliance maintenance" with France and to save face for French President Emmanuel Macron, who met Trump last week and urged him to stay in, the source told Reuters.
Iran has always denied it sought a nuclear weapon, insisting its atomic program was for civilian purposes.
Velayati warned against any move to try to renegotiate the deal signed by Iran and six world powers in 2015 curbing Tehran's nuclear program in exchange for sanctions relief.
"Iran accepts the nuclear agreement as it has been prepared and will not accept adding or removing anything," he said.
"Even if countries allied with the US, especially the Europeans, seek to revise the nuclear agreement... one of our options will be withdrawing from the accord," Velayati added.
Britain, France and Germany - the three European countries that signed the deal - have repeatedly tried to persuade Trump not to abandon it.
French President Emmanuel Macron on Wednesday reiterated his commitment to the accord but admitted that it needed strengthening.
"I don't know what the US president will decide on May 12," Macron said during a visit to Sydney.
"I just want to say whatever the decision will be, we will have to prepare such a broader negotiation and a broader deal, because I think nobody wants a war in the region, and nobody wants an escalation in terms of tension in the region," he said.
United Nations Secretary-General Antonio Guterres warned on Thursday against scrapping an international deal on Iran's nuclear program unless there was a good alternative in place.