What do I do to get rid of it, and can it harm my ants?
Some sorts of it may kill your ants. Mostly by killing the brood.
It depends on some things.
Is the mould in the nest?
It will be the easyest to move the ants, but you can also just take the mould out.
You can try to kill the mould with strong sunlight or an UV-lamp.