Yes! Ants will aggressively compete with your worms for food and will probably treat them as food too!
Thankfully, this is easy to fix. And this is the secret that the ants don’t want you to know! They hate water. Like, a lot. If there are ants getting into your bin, stand the legs of the bin in dishes/bowls of water and the ants won’t enter your farm. If you’ve already got ants, increase the moisture level of the worm farm and that will drive out the ants.
Regular applications of water will be enough to increase the moisture in the farm enough to drive out the ants, but not harm the worms. Excessive moisture added can result in harm to your worm farm as the worms will not be able to “breathe” and can potentially turn the farm anaerobic making even more harmful to the worms.
You can find answers to questions just like this and so many more in the Worm Farming Alliance.
The Gentleman Vermiculturist can be found on Facebook and Instagram as well as other social media. He talks incessantly about worms.