Hmm, let me check in again with France… Oh, what, they have a thing called the Foreign Legion, where they want foreigners to fight for them? It seems like actually France wants people to fight for nations that aren’t their own.
I'm French, I know the foreign legion, we accept foreigners in our army, it doesn't mean we accept our own citizen to fight for foreign parties, especially non state armies, they're not mutually exclusive, there is no logical connection between your two statements
From a moral viewpoint, letting someone of your country join another country’s foreign legion is identical to letting someone of another country join your foreign legion. If you say that joining a different group to fight ISIS is not okay while joining France to fight France’s enemies is okay, then you’re saying that ISIS is a better group in the world than France’s enemies.
Fighting for a foreign nation or mercenaries is illegal, no matter if you're fighting the "bad guys"