By Katya Golubkova and Gabriela Baczynska

MOSCOW (Reuters) - The weakness of the rouble is hurting Russia, which has lost tens of billions of dollars because of sanctions imposed by the West in the Ukraine crisis, Prime Minister Dmitry Medvedev said on Wednesday.

In a sober assessment of an economy edging toward recession, Medvedev said Russia should reduce its reliance on energy exports, which makes it vulnerable to falls in the global price of oil.

But he said Russia still had options, such as its companies and banks turning to Asia for funds and boosting domestic production to reduce dependence on imports, and added that history proved sanctions could not hold back a country for long.

The weakening of the rouble "has a certain impact on the budget, on how it balances and for a number of other reasons too, but nevertheless ... a substantial weakening of the rouble is not advantageous for the state and the economy," Medvedev said in the interview with Russian television channels.

The rouble has fallen around 40 percent against the dollar since June, fuelling inflation and hitting gross domestic product.

Asked about the impact of the Western sanctions, Medvedev said: "Our economy, probably, has lost tens of billions of dollars."

Echoing President Vladimir Putin, he said sanctions hurt not only Russia, but also those who imposed them.

The prime minister, who was president for four years until Putin's return to the Kremlin in 2012, said there were tough times ahead. But he underlined that all Russians, including officials, were in the same position.

He said he held his money in roubles as he was paid in roubles - a sensitive topic as the sinking currency prompts Russians to change their money into hard currency.

Asked whether officials had access to luxuries that others could not buy as often happened in Soviet times, Medvedev said there was no preferential treatment.

"As for the government canteen, in no way does it differ from any other canteen," he said.

"In Soviet times it had discount prices, special food products. But there is no such thing anymore; no oysters, nothing that would not be available in other places."

(Additional reporting by Alexei Anishchuk, writing by Elizabeth Piper, editing by Jason Bush)