To the extent that this question isn't a request for particularized writing advice, it's a question about how to avoid using pronouns in ways that leave readers puzzled about the intended referents of those pronouns. The most intelligible way to answer such a question, I think, is to demonstrate how to avoid ambiguity in a complicated example such as the OP's—so that's what I'll try to do here.
The original example contains two instances of she and one instance each of her, he, and him. The he and him aren't ambiguous because they unmistakably refer to John, but they contribute to a pronoun blizzard effect (five pronouns in the space of twelve words) that makes the instances of she and her even less straightforward to parse than they would be in the absence of other pronouns. Meanwhile, the example's core problem involves the presence of Mary and Cindy in the first sentence—both of them available as possible referents for she, her, and she in the second sentence.
I would first revamp the example to reduce the total number of pronouns it contains. In particular, I would focus on getting rid of avoidable instances of she and her, as follows:
Mary, unlike Cindy, likes John a lot. Cindy refuses to talk to him, because she thinks he is annoying.
In this wording (as in the original wording of the example), I think it's a good idea to repeat the word Cindy at the beginning of the second sentence. My reasoning is that the first sentence initially focuses on Mary, and the remainder of the first sentence doesn't give readers enough grounds to feel confident that Mary has now dropped out of the picture and won't be mentioned or referred to again after that first-word occurrence. By starting the second sentence with Cindy, you clear away any doubt that Cindy is the referent for subsequent occurrences of she or her in that sentence. The single most useful editorial change, however, is the replacement of "won't let him talk to her" with "refuses to talk to him," because it eliminates the most superfluous of the five pronouns from the text without any loss in meaning.
There are still two weaknesses in the revised sentence, though. First, the proximity of unlike to like (used in a different sense from the opposite of unlike) is infelicitous. Second, the point that Cindy doesn't like John is evident from the observation in the second sentence that she finds him annoying, so there's no reason to make the point twice. With those things in mind, I would alter the sentences a second time, reducing them to the following form:
Mary likes John a lot; but Cindy refuses to talk to him, because she thinks he is annoying.
The net effect of the changes is that we have three instances of proper names, just as we did before, and we have three instances of pronouns instead of five; and the sole survivor of the original she, her, she trio appears in a syntactical structure where it unmistakably refers to Cindy.
For alternative meanings 1 and 2 in the OP's question, I would reword the example as follows:
1. Mary likes John a lot. But Cindy thinks he is annoying and won't let him talk to Mary.
2. Mary likes John a lot. But she won't let him talk to Cindy, who thinks he is annoying.
By examining contextual clues, attentive readers can work out the intended referents of she, her, and she in the original wording of the example. But that doesn't mean that the original example isn't syntactically ambiguous. At one one end of its range, pronoun referent ambiguity is merely a matter of awkwardness and minor vagueness, requiring readers to stop and figure out what the intended connections are. At the other end of its range, such ambiguity is hopelessly indeterminate, and readers simply can't tell which pronoun goes with which prior noun. The OP's example, though it tends toward the merely awkward end of the continuum, is much more reader-friendly when we strengthen the connections between any potentially ambiguous pronouns and their referents.