That doesn't sound correct. My understanding of the history is that Iran democratically elected a socialist who wanted to nationalize Iran's oil fields so they could keep the oil revenue inside their country instead of giving it away to BP and Exxon. The British orchestrated a coup to install the old monarchy (the Shah), who brought back the British extraction companies and harshly repressed Shia Muslims. Then in 1979 the Shia hardliners toppled the government in the Islamic Revolution which is where the current government originates from. The last real democratically elected president of Iran was the socialist one, Mohammad Mosaddegh.
No. Mossadegh was appointed by the Shah (who was still head of state), but his own autocratic actions such as dissolving parliament and giving himself autocratic powers pushed most political forces against him that a confrontation was inevitable. There is a reason the military stood back as he was disposed. Furthermore, the Shah did actually have the legal right to fire Mossadegh, when je ignored that the situation was already extra legal.
I don't know where you are reading history from but listening to random factoids rather than a comprehensive understanding is the worst way to do so.