The Court of Justice (ECJ) ruling came after a Belgian woman alleged the local municipality where she worked had infringed her religious freedom by telling her she couldn’t wear a hijab.
The court added such measures must be limited to what is strictly necessary.
The issue of the Islamic headscarf has divided Europe for years.
In 2021 the court ruled that women could be fired from their jobs for refusing to remove their hijab if they work in a job that deals with the public.
The latest case arrived at the court after a Muslim employee of the eastern Belgian municipality of Ans was told she could not wear a headscarf at work.
The woman, who works as head of an office and is not in a public-facing role, launched a legal challenge.
The municipality then amended its terms of employment, saying they required employees to observe strict neutrality, which means any form of proselytising is prohibited and the wearing of overt signs of ideological or religious affiliation is not allowed for any worker.
Hearing the case, the Labour Court in Liège said it was uncertain whether the condition of strict neutrality imposed by the municipality gave rise to discrimination contrary to EU law.
The ECJ answered that the authorities in member states had a margin of discretion to designate the degree of neutrality they want to promote.
It added that another public administration would be justified if it decided to authorise the wearing of visible signs of political, philosophical or religious beliefs.
France has a strict ban on religious signs in state schools and government buildings, arguing that they violate secular laws. The headscarf and other “conspicuous” religious symbols were banned in state schools in 2004.
In August France’s Education Minister Gabriel Attal said state school pupils would be banned from wearing abayas, loose-fitting full-length robes worn by some Muslim women.
The garment had been increasingly worn in schools leading.