Mark my words, if Iran tries to distance itself from Russia, we will see Kurdo Azeri problems in Northwest of Iran again. Like I always say people do not change, nations do not change either, just governments change. Tsar Royal Russia, and Communist Russia both ate chunks of Iranian lands. Federalist Russia so far has not gained enough strength that they can go for land expansion but they have shown intentions of eyeing the entire Caspian sea and resources. If Iran opposes that Aliyev will be up our *** with Azeri ethnicism and PJAK terrorism will start in Iran again.
Russians are sophisticated and calculating people who love their nationhood. They care less about others. An admirable quality as a country. They know they need allies as much as possible in these times, especially allies with natural resources who can tighten the Russian grip on western need for hydrocarbon imports. How much Iran can get out of this current situation is upto the Iranian strategists. I do not see much happening to be honest.
No need to be fearful about Russia deciding to support anti-Iranian pan-Turkism I believe, for the zionists and the west are already doing everything they can in this regard, and they are immensely more resourceful than Russia is and will be in the foreseeable future.
As for opposing Russia, the notion that Moscow might react in such a manner never caused Iran to forego her interests vis à vis the Russian Federation. Iran fully supported Bosnian Muslims against Russian-backed Serbs in the 1990's civil war, Iran even trained a handful of Chechens fighting Russia during the Yeltsin days, later on Iran threatened to sue Moscow at the Hague international tribunal over delays in S-300 deliveries. But none of these prompted the Russian Federation to prop up Azari or Kurdish separatism against Iran.
To me this truly looks like a very remote eventuality. Pan-Turkism especially would be a double-edged sword from Russia's perspective, all the more so given NATO member Turkey's involvement with the Baku republic.
More importantly, there's no reason for either Iran or Russia to resort to these sorts of measures against each other. Bilateral relations are at an all time high, with Supreme Leader of the Islamic Revolution stating he expects them to keep expanding in the upcoming years.
Regarding people and governments, it's governments that forge policy. Different governments in one same country can pursue opposite policies on numerous levels, case in point the Pahlavi monarchy and the Islamic Republic of Iran (it probably won't be necessary to enumerate the fundamental differences between the two).
But even people can change. That's why social engineering isn't a myth but an effective tool of lasting collective behavioral modification. As an example, the German people in 2022 aren't identical to the German people of 1940 (again, it'd be superfluous to go into details I think).