Yep. My root aphid problems came along with an ant problem.
If you can, keep your plants elevated off the floor on a table... Keep a layer of tanglefoot all the way around the base of the table legs. No insects will be able to crawl up the table.
Also, cinnamon in the ants path helps. It is no cure... but it really pisses them off. If you spread the cinnamon thick enough they will not cross the area...
So basically, you have to find the path of the ants from outside to your pots... then put an end to it. You could make a fucking moat around your garden if you wanted. Just stop the path.
After you stop the path, then you can kill the ants in your pots. If you want to put a serious end to the problem... drench with evergreen 6-60. It is a strong pyrethrin mix. It is totally safe all the way through flowering.
I would do a thorough cleaning and pesticide treatment of your grow after you finish. Root Aphids will have you pulling your hair out.
Once you have them, you never really get rid of them. They can pop back up two years later. Seemingly out of nowhere.