The No True Scotsman Fallacy is subject to a serious fallacy in its application. Namely:
This person claims to be a member of group X, or he has some attributes that resemble group X, therefore group X is collectively responsible for anything he does, and if you try to disavow him, you are trying to weasel out of responsibility with the No True Scotsman Fallacy.
e.g. A lunatic tortures small children to death. When he is caught he says that he did it because he is a member of the Church of Foobar and he is performing human sacrifices to their god. The Church of Foobar says their religion does not practice human sacrifice and this person was never a member of their church. Opponents of the Church of Foobar say, Too bad, he says he's a Foobarian, therefore he is a Foobarian. This proves that Foobarians are all dangerous maniacs.
It all comes down to, What is the definition of X?
In the literal case, the definition of a "Scotsman" is presumably "someone born in Scotland" or "someone who lives in Scotland", maybe some qualifier about how long he lived there or his ancestry. If someone said, "No true Scotsman would waste his money like that", that's a fair example of the No True Scotsman fallacy. If he was born and lived in Scotland, he is a "true Scotsman" no matter how he spends his money.
On the other hand, Protestants often say that the Spanish Inquisition were not "true Christians" and therefore attempts to blame Christianity for their crimes are erroneous. Their argument is that the Inquisition banned people from reading the Bible and killed people for preaching the Bible, and by definition a "Christian" is someone who believes in the Bible and reveres it.
So in this case, what is the definition of "communist"? I don't think any recognized definition of "communist" includes the idea of "being a nice person", so the fact that Stalin had political opponents tortured and killed does not make him "not a true communist". An argument like that would be an excellent example of the No True Scotsman Fallacy.
But what exactly IS a communist? If you formulated a coherent definition that was reasonably consistent with the general understanding of the term, i.e. something that included the idea of government control of the means of production (or perhaps "communal control"), and that Stalin did not meet, you could have a reasonable argument.
If you are trying to distance your own political party or movement from Stalin, this could be a little easier. Even if both you and Stalin could be considered "communist", you could still say, "But our policies are not the same as Stalin's, and so the evil results of Stalin's policies do not apply to us." The question then would be whether the differences were significant and relevant, which depending on the details might be easy to prove and might be hard.