Ants don't directly attack the plants so in many cases treatment isn't necessary, but they do farm insects (like how we farm cows) like aphids, scale, and whiteflys, which feed on the leaves and stems of your plant. Damage to the roots should be very minimal because they usually dig around the roots, but if they are causing damage there are steps you can take against these hard body insects. I would start off by using an organic insecticidal soap and wash the plant from top to bottom. Then follow it up by spraying the plant and drenching the soil with a neem oil solution. However, if your employing beneficial insects then a safer approach would be to grow plants like lavender, sage, or catnip. Making a lavender and sage tea is also a safe treatment if you can't grow other plants next to your cannabis.
Hope that helps,
- Vin