Ahmadinejad was quoted by the official IRNA news agency as saying he would like to be "beside Iranian athletes" during the Games but the British are reluctant to have him.
"I would like to be next to our young athletes at the 2012 Olympics but the host has a problem with this," Ahmadinejad said during a meeting with Iranian athletes who have qualified for the Olympics.
So far some 50 Iranian athletes have qualified to participate in the Olympics in several sports, including weightlifting, wrestling, shooting, track and field, and table tennis.
Ahmadinejad did not specify whether he has officially requested to attend the Games or say if Britain has refused him entry.
Britain's Foreign Office declined to comment on Ahmadinejad's claim, saying its policy was not to discuss individual visa cases. However, British authorities have confirmed that anyone can be stopped from entering the country - including for the Summer Games - if it is decided that their presence would be "unconducive to the public good."
The International Olympic Committee had no immediate comment.
Britain has been in a standoff with Iran over the country's nuclear program, which the West suspects is aimed at producing an atomic weapon. Iran denies the charge, insisting the program is for peaceful purposes only.
In 2011, Britain cut ties with Iran and closed its embassy in Tehran after militant Iranian students stormed the mission. The raid followed a move by Iranian lawmakers to decrease relations and allegation of hostile British policies toward Tehran.
Ahmadinejad's remark could also be interpreted as a snub to his conservative hard-line opponents in parliament who oppose restoring ties with Britain.
Last year Iran objected to the logo for the 2012 Olympics, contending it was racist because the symbol vaguely resembled the word "Zion," according to Iranian authorities. There was even a warning of a possible Iranian pullout of the Games but that threat was later dropped.