"The disputes can be resolved with goodwill and flexibility ... I believe that the July 20 deadline can be met despite remaining disputes. If not, we can continue the talks for a month or more," he said.
"During the nuclear negotiations we have displayed our strong commitment to diplomacy," Rouhani went on, in comments broadcast live on state television. "(But even) if a deal can't be reached by July 20, conditions will never be like the past. The sanctions regime has been broken."
Iran and the powers will hold another round of talks in Vienna on June 16-20 to tackle a deadlock which has raised the likelihood that the deadline will lapse without a deal meant to head off the risk of a Middle East war over the nuclear issue.
An outright failure of the faltering talks would strengthen the position of conservative hardliners in Iran's clerical establishment against Rouhani, who has endeavoured to improve relations with the United States. The countries severed ties during a hostage crisis after the 1979 Islamic Revolution.
Read MoreIraq's oil industryfaces setback to revival
"The West should use this opportunity to reach a final deal in the remaining weeks. American hawks and Israel will be blamed for (any) failure of the talks," Rouhani said.
Israel, Iran's regional arch-foe, has cast doubt on whether diplomacy is capable of curbing in Iranian nuclear activity and, if it cannot, has threatened to bomb Iranian nuclear sites. Its scepticism is shared by hawkish supporters in the U.S. Congress.
The latest round of negotiations in Vienna last month ran into difficulties when it became clear that the number of centrifuge enrichment machines that Iran wanted to maintain was well beyond what would be acceptable to the West.
Resolution needs goodwill
Iran says it needs to maintain a domestic uranium enrichment capability to produce fuel for a planned network of nuclear power plants without having to rely on foreign suppliers.
Wary Western officials believe Iran will need many years to build any nuclear power station and that its underlying goal in enriching uranium is to be able to yield material for nuclear bombs at short notice, an allegation the Islamic state denies.
Read MoreISIS militants steal $450M, advance on Baghdad
Iran, the United States, Britain, France, Germany, Russia and China set the July 20 deadline to reach a comprehensive agreement in an interim deal they reached in Geneva on Nov. 24.
The November pact - in which Iran suspended some sensitive nuclear activities in return for limited relief from sanctions - allowed a six-month extension if more time were needed for a final deal. The preliminary accord went into effect on Jan 20.
It is increasingly improbable that six world powers and Iran will meet the deadline, officials and analysts say.
While an extension is possible, experts believe both sides may come under pressure from critics at home to seek better terms during this extra period, further clouding the outlook.
Khamenei weighs in on 'nuclear rights'
In another sign of Iranian determination not to negotiate away its enrichment work, a top aide to clerical Supreme Leader Ayatollah Ali Khamenei said Iran would never renounce its peaceful nuclear rights under pressure.
"The Islamic Republic of Iran will never be influenced by pressure exerted by others who seek to deprive Iran of its nuclear rights and will never back down from its rights," Ali Akbar Velayati told the official IRNA news agency.
Read MoreObama: Any Iraq action will take days to plan
The two sides said last month that they had intended to start writing the text of a final agreement but the full-scale drafting did not actually begin.
Rouhani, a former chief nuclear negotiator for Tehran, said on Saturday that Iran and the powers might start drafting the final agreement in next week's talks.
"The major powers and Iran have agreed on two issues with Iran: We will continue our uranium enrichment activities and all sanctions on Iran will be lifted," he said, adding that no one would benefit from the collapse of the talks.
Iran now has about 19,000 centrifuges installed, of which roughly 10,000 are operating, according to the U.N. nuclear watchdog. Enriched uranium can have both civilian and military uses, depending on the degree of refinement.