You’re referring to “Anthem,” not “We.” I know you read the Ayn Rand novel; you just switched the names. The 2 novels are often compared; they’re both by Russians, both dystopias condemning collectivism. “We” was written by Yevgeny Zamyatin.
Yeah, I think you’re right. I read it in a pulp magazine about 50 or 60 years ago, so my memory is dim. But “Anthem” rings a bell.