Ants and plants
The ants should not have any direct detrimental effect on your Elderberry. If you did happen to get aphids or scale on the Elderberry, ants can sometimes "protect" these pests from predators in return for the honeydew they produce. In that instance you would need to try to control the ants. Otherwise, don't worry about them on this shrub.