But in private, Iranian officials have voiced a willingness to work with the United States on IS, though not necessarily on the battlefield. U.S. Secretary of State John Kerry said on Friday that Iran has a role to play in defeating Islamic State, indicating the U.S. position may also be shifting.
"Iran is a very influential country in the region and can help in the fight against the ISIL (IS) terrorists ... but it is a two-way street. You give something, you take something," said a senior Iranian official on condition of anonymity.
"ISIL is a threat to world security, not our (nuclear) program, which is a peaceful program," the official added.
Tehran rejects Western allegations that it is amassing the capability to produce atomic weapons under cover of a civilian nuclear energy program.
Another Iranian official echoed the remarks. Both officials said they would like the United States and its Western allies to show flexibility on the number of atomic centrifuges Tehran could keep under any long-term deal that would lift sanctions in exchange for curbs on Tehran's nuclear program.
Read More Cameron condemns ISIS beheading of UK aid worker
"Both sides can show flexibility that will lead to an acceptable number for everyone," another Iranian official said.
West wants to keep atomic talks separate
Western officials told Reuters that Iran has not raised this idea in nuclear negotiations with the United States, Britain, France, Germany, Russia and China that resumed in New York on Friday. Diplomats close to the talks say they are unlikely to settle in New York on a long-term accord that would lift sanctions in exchange for curbs on Iranian nuclear work.
The Western officials said it would be difficult for them to even discuss the point in the atomic negotiations as the United States and its allies are determined to keep the nuclear negotiations focused exclusively on atomic issues as the Nov. 24 deadline for a deal nears.
"We are seeing as we get closer to the end of the talks that the Iranians are tempted to bring other dossiers to the table," a senior Western diplomat said.
"They sometimes indicate that if there were to not be a (nuclear) deal, the other dossiers in region would be more complicated," he added. "The six are determined not to bring the other subjects to the nuclear negotiations table."
The New York talks among senior foreign ministry officials from the six powers and Iran are taking place on the sidelines of this week's annual gathering of world leaders at the U.N. General Assembly.
The number of nuclear centrifuges has emerged as the principal sticking point in negotiations, which are expected to continue in New York until at least Sept. 26.
Centrifuges are machines that spin at supersonic speed to increase the ratio of the fissile isotope in uranium. Low-enriched uranium is used to fuel nuclear power plants, Iran's stated goal, but can also provide material for bombs if refined much further, which the West fears may be Iran's latent goal.
Read MoreHow ISIS managed to acquire $2B in assets
Iran currently has over 19,000 centrifuges, though only around 10,000 of those are operational. The six powers want Iran to reduce the number of operational centrifuges to the low thousands, to ensure it cannot quickly produce enough bomb-grade uranium for a weapon, should it choose to do so.
Iranians are keen to keep as many of their centrifuges as possible, and have also suggested that they could keep all 19,000 installed while maintaining a much smaller number in an operational state. Western officials say they dislike that idea.
U.S. officials have made clear for months that the number of centrifuges they are willing to tolerate operating in Iran over the medium term would be in the low thousands to ensure that Tehran's ability to produce a usable amount of bomb-grade uranium, should it go down that road, is severely limited.
Iran says such draconian limitations would be a violation of its right to enrich. Supreme Leader Khamenei has called that issue a "red line" for Tehran.
Centrifuges are not the only sticking point in the talks. Others include the duration of any nuclear deal, the timetable for ending the sanctions, and the fate of a research reactor that could yield significant quantities of bomb-grade plutonium.
Under a November 2013 interim deal, Iran froze some parts of its atomic program in exchange for limited sanctions relief. That agreement was intended to buy time for negotiations on a comprehensive deal that end the decade-long standoff with Iran and remove the risk of yet another war in the Middle East.