It’s a roundworm, Nematoda. For information see here:
Hyperlinks sind nur für registrierte Nutzer sichtbar
Ants are quite often parasitized by worms. For Lasius a genus Mermis is mentioned in the literature.
The German Ameisenwiki presents some information on ant-worms, including pictures:
Hyperlinks sind nur für registrierte Nutzer sichtbar
see “Nematoden” for such kind of worms. But there are others, and other groups of parasites and diseases, such as flatworms, tapeworms, fungi, bacteria, viruses, mites, ... too.
Ant parasites should not be distributed in foreign countries where they could infest and damage native ant species. Therefore foreign ants MUST NEVER be released into the open, their escaping MUST be thoroughly prevented.
derameisige