Is the apple tree in the ground or a pot?
There are a number of ways to stop the ants.
I had them on a cherry blossom planted in the ground so put a ring of vasilin, several inches wide around the bark at the bottom, it needs to be wide enough so they can't bridge it and might need replacing over the summer. The ants don't die and will try to bypass the ring by climbing up any neighbouring shrubs or tree's which touch the apple, so these need cutting back.
The ants will go some place else, mine must have departed the garden as I've never had the same problem on other plants.
If in a pot, ants don't like to much water, I'm given to understand a good dunking in water will get rid of them but others maybe able to help more with this solution.