To be free, a man must be free of his brothers. That is freedom. This and nothing else. (Chapter 12, paragraph 11)
This statement is one of several contradictory ones in the Anthem by Ayn Rand. The author doesn’t deny the society completely, as a union of human being. What Ayn Rand condemns is the society as an entity existing by itself and dictating its laws to the members, making them yield and accept conformity. Conformity leads to stagnation and stagnation is one of the biggest sins against humanity - not only the ones completely obeying the society stop their own development, but they also force the others (especially dependent ones, like kids or employees) follow the same rules, stripping them of their uniqueness and free will.
Still, the author calls the rest of the people “brothers”, not slaves, nor tyrants. It’s a very important point. Ayn Rand emphasizes that she sees everyone as equal - in terms of basic human qualities, dignity, curiosity and ability to reach their goals. Each of them deserves freedom, be they higher or lower on social ladder.
Even the most influential and wealthy people can still be dependent on social norms, therefore they can’t achieve freedom despite all their social success. Freedom from the opinions and influence of others allows a person to look inside themselves and find the way back to the basic values needed to achieve the true freedom and start their way to perfection and development, to achieving their goals and desires. So the first step to freedom is knowing of oneself, in purest form, stripped of the ideas that others instilled into one’s mind.
There are no two identical roads to perfection and success, and no two identical goals and desires. To find the one that is true for the person, they should first reject any false ways that are considered “expected” and “appropriate” by the surrounding people.