His comments appear to be the strongest sign yet that Moscow is prepared to drop traditional opposition to sanctions if Tehran does not co-operate.
"We believe that it's not over yet, that we can still reach an agreement. Nonetheless, if it doesn't work out ... Russia is ready to consider with our other partners the question of introducing sanctions," Medvedev said.
He added, however, that "the sanctions must be smart and not aimed at civilians".
Russia had earlier said it would not accept any "crippling" sanctions against Iran as the US, France and their allies push for tougher action against Tehran over what it sees as its defiance over its nuclear programme.
If it does endorse new sanctions, it would put pressure on China, a fellow permanent member of the UN Security Council, which continues to oppose such measures.
Medvedev's comments on Monday came as the chief of the International Atomic Energy Agency (IAEA) said he "cannot confirm that all nuclear material in Iran is in peaceful activities".
At a meeting of the IAEA's 35-nation board in Austrian capital Vienna, Yukiya Amano also accused Tehran of failing to co-operate with the IAEA and said he wanted Tehran to clarify issues about its nuclear programme.
"We would like to have a discussion with Iran to clarify the outstanding issues and issues that have a possible military dimension," he said.
Delegates were closely following Amano's comments to see if he would follow up on his hard-hitting report on Iran last week.
In that document, Amano, who took up his post in December, expressed concern that Iran may be working on making a nuclear warhead, suggesting for the first time that Iran had either resumed such work or never stopped when US intelligence thought it did.
Iran denies any interest in developing nuclear arms, contradicting a 2007 US intelligence assessment concluding that Iran had worked on such weapons before apparently suspending such activities in 2003.
Amano's report, in contrast, suggested Iran never froze its experiments, expressing "concerns about the possible existence in Iran of past or current undisclosed activities related to the development of a nuclear payload for a missile".
On Monday, Amano defended his report, calling it factual and impartial, but the Japanese diplomat also appeared to strike a slightly softer tone, devoting only four paragraphs to Iran in eight pages of comments.
Ali Asghar Soltanieh, Iran's chief delegate to the IAEA meeting, said "this oral report of Mr Amano was a little bit better than the written", calling last week's written report "unjustified and not acceptable".
A diplomat from one of the board member countries told the Associated Press news agency that said Amano was attempting to defuse passions generated by last month's report and seeking to head off potential confrontation with non-aligned nations on the board that Iran counts on for support.