He was speaking a day after U.S. Secretary of State Hillary Clinton sought backing from oil giant Saudi Arabia to help win Chinese support for additional sanctions.
Clinton said a new round of sanctions should target Iran's Revolutionary Guards.
Of course, if somebody acts against Iran our response will definitely be firm enough...(to) make them regretful, Ahmadinejad told a news conference, without elaborating.
Sanctions will not harm Iran.
Ahmadinejad also said talks were still under way on a proposed nuclear fuel swap and the issue was not yet closed.
Western powers had hoped the proposal, brokered by the International Atomic Energy Agency, would result in Iran sending most of its low-enriched uranium abroad for processing and ease their concerns that it might build a nuclear bomb. Tehran says its nuclear program is solely to generate electricity so it can export more of is oil and gas.
There are some talks under way over the nuclear fuel swap, Ahmadinejad said without giving details.
The case is not yet closed...we have already announced that we are ready for a fuel exchange within a fair framework. We are still ready for an exchange, even with America.
Ahmadinejad's order last week to start production of higher-grade uranium, rather than agree to the U.N.-brokered fuel swap proposal, exposed Tehran to new calls for U.N. sanctions from Western powers.
The Kremlin said on Tuesday Iran could face sanctions if it failed to allay international fears about its nuclear program, and Israeli Prime Minister Benjamin Netanyahu, on a visit to Moscow, called for paralyzing sanctions on Iran.
Ahmadinejad said Iran had been willing to send its uranium abroad rather than enrich it further at home.
But...we found that there is no goodwill in this regard and we told them that if they don't provide us (with the fuel) in due time we would start work inside (Iran).
And even now, if they provide us with the necessary fuel the conditions will be changed, Ahmadinejad said.
Ahmadinejad dismissed Clinton's accusations that Iran was moving toward a military dictatorship. The U.S. military budget was 80 times larger than that of the Islamic Republic, he said.
We don't take her comments seriously, Ahmadinejad said.
He also said Iran was not worried about sanctions targeting its gasoline imports as the country can become an exporter of the fuel in the future.
There are several refineries under construction...and as soon as they become operational we can even export gasoline, he said.
(Reporting by Reza Derakhshi; writing by Fredrik Dahl; editing by Dominic Evans and Angus MacSwan)