The latest case concerns a woman, Asma Bougnaoui, who was dismissed from her job as an IT consultant in France after clients complained about her wearing a headscarf.
The European Court of Justice said one of its advocates general, Eleanor Sharpston, "considers that a company policy requiring an employee to remove her Islamic headscarf when in contact with clients constitutes unlawful direct discrimination."
"Indeed, (her employer's) letter terminating her employment had expressly referred to her professional competence," it added.
But the view by the advocate general contradicts a separate opinion on a similar case in May in which a woman was fired by a Belgian security firm after she insisted on being allowed to go to work in a headscarf.
More From This Section
The EU court will now examine the two cases and may give its judgement in a joint decision by the end of the year, a legal source told AFP.
Opinions expressed by the EU court's advocates general are only initial views and not binding rulings, but usually the court follows the senior lawyer's advice when eventually giving its judgement.
The court could decide to give a general clarification on headscarf bans in Europe and how they may work while still obeying EU law.
France brought in a ban on full-face veils in 2010, despite claims that the ban was discriminatory and violates freedom of expression and religion.
Belgium and some parts of Switzerland have followed France's lead and similar bans have been considered in other European countries.