The United States insists it wants a diplomatic solution to the row but has not ruled out military action.
Dick Cheney, the US vice president, said on Saturday Washington and its allies must curb Iran's atomic ambitions.
But Ahmadinejad was quoted by Iran's student news agency ISNA as saying: "Iran has obtained the technology to produce nuclear fuel and Iran's move is like a train ... which has no brake and no reverse gear".
"We dismantled the rear gear and brakes of the train and threw them away sometime ago," Ahmadinejad was quoted as telling a gathering of Islamic clerics.
An Iranian deputy foreign minister echoed Ahmadinejad, saying the Islamic Republic, which is accused by the West of trying to build nuclear weapons, was ready for any possible scenario "even for war".
Manouchehr Mohammadi, one of the deputies to the foreign minister, was quoted by ISNA as saying at a conference in the central city of Isfahan:
"We have prepared ourselves for any situation, even for war."
Mohammadi said that if the UN Security Council adopted a second resolution imposing sanctions over Iran's controversial nuclear programme, Tehran would press on with its atomic drive.
"If they issue a second resolution, Iran will not respond and will continue its nuclear activities," he said.
The United States accuses Iran of seeking nuclear weapons. Tehran denies the charges, insisting its atomic programme is peaceful in nature.