Let us assume for the moment that in Yugoslavia, the USSR, et cetera, there was an economy based on proletarian property forms, in other words, collective ownership of the means of production, distribution, and exchange. If the state in those countries was actually the dictatorship of the proletariat, then it would defend these property forms against the expropriation of the means of production, et cetera, by a bourgeoisie, or potential bourgeoisie. It would simply not be possible for an elected official to sell means of production to individuals.
If there were “elites” who can become a new bourgeoisie, the dictatorship of the proletariat, as Marx and Engels defined it, would not exist. Whether or not a state is a workers state (the dictatorship of the proletariat) is dependent upon the structure and nature of the state, not on the class origins of someone who holds high office.
The state apparatus in the USSR, Yugoslavia, et cetera, was similar in form to the state apparatus of capitalist countries. It was centralised and hierarchical, and repressed the majority of the people in society. This is why most of these countries could restore capitalism without a civil war. A centralised hierarchical state can switch from state ownership to private ownership without a violent counter-revolution.