"We want them both to lose. The last thing we want is to have any one of them get weapons of mass destruction," Netanyahu said in an interview with CBS Face the Nation.
His comments came shortly after IS claimed the beheading of another Western hostage, US aid worker Peter Kassig, along with that of 18 men described as Syrian soldiers.
In an undated video, a masked black-clad jihadist seen standing above a severed head says: "This is Peter Edward Kassig, a US citizen of your country."
IS "has to be defeated and it can be defeated," he said.
More From This Section
But Netanyahu portrayed the situation as a "global conflict" against militant Islam, not just Sunni-based IS and Al-Qaeda but also Shiite Iran-backed Hezbollah.
"We want them both to lose," he said, insisting: "Iran is not your ally. Iran is not your friend. Iran is your enemy."
The United States and other Western powers have been negotiating with Iran to limit its nuclear program, with a November 24 deadline for a deal fast approaching.
"The alternative to a bad deal is not war. The alternative to a bad deal are more sanctions, tougher sanctions, that will make Iran dismantle its capacity to make nuclear bombs," he said.