In the mid-20th century, a socialist movement began to develop in many parts of colonial Africa and the Arab world. In Arab countries, the goal of the socialist movement was, broadly, liberation through fighting imperialism, opposing the ruling classes and fighting for social justice. The social-economic component, although important, was seen as directly related to the wider issue of nationalism and freedom from colonial masters and their associated domestic elites.

The movement, although successful in galvanising disparate members of society, was often scorned by socialist ideologues for not adhering strictly to the tenets of socialist thoughts, as these were countries that still had not reached such a level of industrialisation and capitalist exploitation that dialectical materialism required. Socialists were also smeared by conservative elements as elite saboteurs. The more radical aspect of Arab communism was its commitment to secularism, and that became the most effective way to delegitimise socialist parties: “communist” became synonymous with “atheist”, and in turn “unbeliever”. This was such a successful smear that someone simply could not be a socialist without having their religion questioned.

I often think of this when I hear the phrase “champagne socialist”. Just as it was entirely possible to be an Arab socialist and not be a raging atheist (not that it mattered anyway), it is also possible to be a socialist and affluent, or at least comfortable. In a similar way to collapsing socialism into godlessness, the view that socialism as something only the poor or deprived can be interested in works to delegitimise and discredit socialist movements by those who are not actually destitute by framing them all as virtue-signalling hypocrites.

The suggestion that you cannot have socialist values without dressing in hessian and self-flagellating whenever you buy a latte (the latte socialist is the new champagne socialist) is not only absurd: it has a clear intent, which is to undermine socialist values by making the impossible demand that one’s actions adhere to one’s political convictions at all times.

It would be like attacking capitalists for giving money to charity. Imagine not just scrutinising the property prices and private-school expenses of left-leaning politicians, but sending photographers with long-lens cameras to snap grainy photos of Conservative MPs surreptitiously throwing some coins in a street beggar’s bowl. Imagine a headline: “SNAPPED – the Conservative politicians giving YOUR money to charity”. It just doesn’t happen, does it?

Sure, latte socialists are annoying. We all know one. Those who prefer to tweet about homeless people rather than actually set up a direct debit to a homeless shelter or do some volunteering. People to whom socialism is a personality trait, along with a tattoo and a gap year teaching brown kids to use as a Facebook profile photo. But that’s not because their wealth makes it impossible to enact socialist values in even the most nominal sense, it’s because they’re narcissists.

But socialism isn’t about making you give up your money or pursue affluence. It is, at its core, about making life fairer and accounting for structural scaffolding that rigs the system in favour of the few. It doesn’t mean the erosion of the individual, an endangered species according to conservatives.

So abhorred is the collective to those on the right that even the Windrush scandal, in an impressive feat of contortion on the part of Jacob Rees-Mogg, can be attributed to socialism. “The Windrush issue came about because the state put the interests of the collective ahead of those individuals who had come here perfectly legally prior to 1973, and … it was more convenient for the Home Office to make them prove who they were and show their papers. This is socialism.” According to this definition, standing in a queue is socialism.

When you cut through the worthiness of it, if that’s not your thing, looking out for the collective good is ultimately rooted in individual self-interest. A society where inequality is extreme cannot be policed effectively. Think of post-apartheid South Africa. White families had to build entire fortresses and compounds to protect themselves against what they viewed as a now feral black population unleashed from the necessary apartheid shackles. It does not occur to those rich people that apartheid is what created the hazard, effectively creating two separate societies so unequal that conflict and a forceful redistribution of wealth was inevitable.

When large parts of society do not have the access to employment, and no safety net that guarantees them basic healthcare, shelter and nutrition, things start to break down. This is not to suggest that theft is justifiable, but that to hoard resources and expect the poor to starve in submissive dignity is just a little bit unrealistic.

‘I don’t see you, oh virtue signaller, who I spot is carrying quite an expensive smartphone, giving yours up.’ Photograph: Alamy Stock Photo

And yet it is socialists who are always accused of being unrealistic, of not making enough allowance for human nature. For not understanding that the money must come from somewhere – and I don’t see you, O virtue signaller, who I spot is carrying quite an expensive smartphone, giving yours up. Call yourself a socialist?

Well, yes. In a way, asking if one can be a socialist and rich is like asking whether a women can be a feminist and a stay-at-home mum. Believing in a political or social value does not mean living your life like a monk, dedicating every minute to the cause. But it does mean that there must be some way in which the ultimate purpose of feminism or socialism, which is to further the cause of equality, is advanced. It doesn’t matter how small, inconsistent or dissonant with your lifestyle to the naked eyes this effort is, as long as it means there is a gentle pressure on the scales to tip in the right direction.

The historian Bernard Lewis (typically scornfully) stated: “Nobody seems to have a good word to say for Arab socialism. Commercial, professional, and middle-class elements bring against it the usual complaints which are brought against socialism in western countries. Leftwingers dismiss Arab socialism with contempt as a half-hearted and inefficient compromise which has the merits neither of socialism nor of capitalism.”

But the movement presented a strong cadre of anti-colonial activists and post-independence politicians who, even if ideologically inconsistent and hailing from an elite, contributed incrementally to the liberation movement. They also drank a lot of coffee in street cafes, which was spun by their political establishment enemies as the pastime of indulgent, pontificating armchair critics. So go ahead and buy that latte: you are part of a noble tradition.

• Nesrine Malik is a Guardian columnist