It is one of the common myths about Mosaddegh. His dissmissal was a legal order from the Shah. Mosaddegh dissolved the parliament and was warned even by some of his friends that in this situation, the Shah will have the right to dismiss you. And what was his response? "Shah wouldn't dare." He never questioned its legal basis.
It was not a coup. It was not instigated by the US.