Rouhani said the U.S. and Israel have isolated themselves by opposing the 2015 nuclear agreement.
The president separately told reporters he had made up his mind on whether to leave the Iranian denuclearization pact that he has long said was poorly brokered by his predecessor Barack Obama - but he would not disclose his position.
It was mainly a procedural move, but it was significant, as re-imposing nuclear-related sanctions could lead to Iran ending its compliance with the deal and reverting back to rapid uranium enrichment - something Iran has threatened to do if the USA reneges on its end of this bargain.
He further said Iran's national defense program was being subjected to intensive debates amid a deafening silence over the weapons being used on a daily basis against innocent civilians in Yemen. "I thought it was very dark, dangerous, not the kind of message that the leader of the greatest nation in the world should be delivering", she said.
US officials say such "malign activities" go against the spirit of the 2015 agreement under which Iran won relief from worldwide sanctions in exchange for shelving its nuclear program.
"If it has flaws we can fix them", Iranian President Hassan Rouhani said.
Rouhani addressed the parade in Tehran, saying that Iran would not halt its missile program but continue to boost military capabilities, despite USA demands. Iran, he said, would "not be the first" to violate the deal.
Tehran has backed Yemen's Shiite rebels known as Houthis against a USA -supported and Saudi-led coalition of mostly Arab states that seeks to return the internationally elected government to power in Yemen.
McMaster spoke to CNN's Chris Cuomo, castigating the deal's sunset clause, which lifts restrictions on Iran's nuclear program after 2025, as well as the trustworthiness of the Iranian regime. "When you see the DPRK proliferation issue, which is not controlled of course because (it is) a rogue state, and then you have the kind of controlled agreement on Iran, that is the way to go".
The deal, Rouhani said, is supported by his government and the five other parties Russia, China, Britain, France and Germany that signed the agreement. This, despite the USA president already certifying twice this year that Tehran is fulfilling terms that require it to give up its nuclear weapons program for sanctions relief.
His comments came as Iran displayed a new missile at a military parade marking the anniversary of the outbreak of its devastating 1980-1988 war with Saddam Hussein's Iraq. Rouhani was unequivocal, telling reporters at the UN: "The nuclear deal can not be renegotiated".
Iran showed off a new missile, named Khoramshahr after a southwestern city, at an anniversary military parade in the capital.
Under US law, Trump must decide by October 15 whether to recertify Iran's compliance with the agreement. "Perhaps the technical aspects have [been met], but in the broader context the aspiration has not", he said.