It goes both ways. In my garden I observed ants carrying tiny little parasitic aphids up on sensitive plant spots and eat their glucose rich feces they produce by sucking fluids from the plant.
https://www.newscientist.com/article/2113410-fijian-ants-gro...