Can the ‘No True Scotsman’ apply to ideologies and the countries that attempt to infuse them, such as Communism in China and Socialism in Russia, where by saying “They weren’t really Communist/Socialist” is the No True Scotsman?
In a general sense, yes it can be applied. But China and the USSR were state capitalist economies, and that is demonstrable. Saying that they aren’t “true” communists is then factual, but it also depends on what a communist is. Given the most common definition of communism as a stateless, classless society with common ownership of the means of production, China and the USSR were definitely not communistic.
To expand on this slightly, saying that they weren’t really communist because they had state capitalist (i.e. not communist) economies would not count as the “No True Scotsman” argument for the same reason that saying someone is not a christian because they don’t believe in god or any aspect of the bible wouldn’t be.