If you find it inside your tree, it is not bringing disease to the tree. Neither is it eating or wrecking the tree. What it is doing is harvesting the rotten wood, fungus and other organisms that ARE eating the tree. It is performing a caretaker function for you. Never try to eliminate ants from the inside of trees, they are sending a signal that the tree is in danger and ill health.
Some gardeners see an ant hill in their lawn and react with panic.
Again, the ants in lawns are not creating a problem in healthy grass. Both you and the ant colony will appreciate this benign neglect. Some gardeners see ants scurrying around on the paving stones on patios or driveways. This is a pain in the garden as they can undermine the stone foundations. Slowly pour boiling water down the ant hills.