"But we do not wish to continue. It's America that must choose whether it wants to end this or not," Pezeshkian said, responding to the question in an interview aired on Fox News.
"When we can resolve issues through dialogue, we shouldn't resort to killing one another."
Pezeshkian insisted Iran was ready to strike a deal with Trump to end the conflict.
"Why is it that within two weeks after the signing of an agreement, they chose to blow it up?" he said of the collapse of a shaky ceasefire.
"If the current American government, within international legal frameworks, wishes to reach an agreement, fine. If not, before the (US midterm) elections or after the elections, what difference does it make for us?"
Pezeshkian made a defiant stand at the UN on Wednesday, telling the world that Iran would not "bend at the knee" to Washington.
US President Donald Trump said on Tuesday he could "annihilate" Iran if there is no deal to end the war, but also suggested an agreement could come soon.
Trump said US special envoy Steve Witkoff and Jared Kushner spoke with Iranian officials on the sidelines of the UN General Assembly and characterised the discussions as productive.
The president has offered shifting goals and timelines for the war that began on February 28 when the US and Israel attacked Iran and Tehran responded with its own strikes on Israel and Gulf states that host US bases.
Trump has cited weakening Iran's nuclear capabilities as one of his war objectives.
Tehran says it has the right to develop nuclear technology for peaceful purposes as a party to the nuclear Non-Proliferation Treaty (NPT).
Separately, Iranian airlines have been barred from neighbouring countries including the United Arab Emirates and Oman in response to new US sanctions.
The General Civil Aviation Authority of the UAE, the Middle East's biggest travel hub, said as a result of the new US policy it was suspending all flights by Iranian airlines until further notice.
Iran's Tasnim news agency reported that flights had also been shut down to Oman, Georgia and Azerbaijan, and to the Iraqi capital Baghdad.
It said authorities were working to route flights to another Iraqi airport, in Najaf, a major Shi'ite Muslim religious pilgrimage site.
The United States had announced it would put sanctions on any global companies doing business with Iranian airlines after September 23, with the aim of grounding Iran's entire civil fleet worldwide.
Other countries in the Gulf region also appeared to have restricted flights.
Tehran's Imam Khomeini Airport listed scheduled arrivals and departures on Thursday to and from countries including Afghanistan, Armenia, China, Iraq, Pakistan, Tajikistan and Turkey.
But no flights appeared to be listed to or from the nearby Gulf states, with which Iran has long had some of its most important business and travel ties.
With the US-Israeli war against Iran largely stalemated for months on the battlefield, the US has announced a shift in tactics to extend the reach of its financial sanctions by targeting companies from third countries that do business with Iranian firms, a practice known as "secondary sanctions".
A flight ban, if sustained, could deepen Iran's isolation and worsen an economic crisis in the country, which is already facing a US blockade of its ports at sea.
with DPA