Mortal sin refers to the state of grace (or rather, the lack thereof); excommunication refers to the state of the person’s relationship with the Church (the Mystical Body of Christ).
It is important to note that being in the state of mortal sin and being in the state of excommunication are not interchangeable; they exist on two different planes. It is sometimes the case that the two states are found in the same individual, but certainly not the rule. So someone who has procured an abortion would be both in the state of mortal sin and in the state of excommunication latae sententiae (incurred by the act itself). Someone who has committed murder would be in the state of mortal sin but not necessarily in the state of excommunication. Someone who attacks a bishop may incur the state of excommunication without necessarily committing a moral sin.
Mortal sins can be forgiven in the context of sacramental confession. Period. As long as it’s a valid confession, the individual is no longer in the state of mortal sin after absolution. Excommunication can be lifted within the context of confession as well, if the excommunication is not “public” - latae sententiae excommunications, because it’s not an explicit excommunication declared by the Church, can usually be lifted in confession, provided the ordinary of the diocese has given permission for the priest to do so (and most do). An exception is if the excommunication is something so grave that the Apostolic See reserves the sole right to lift it. Someone who publicly argues that abortion is good may be excommunicated ferendae sententiae, in which the Church publicly declares that the individual has removed him/herself from the Church. These excommunications can only be lifted through the proper channels.
So to answer your question - normally someone who gets an abortion is not “excommunicated publicly” and can return to the sacraments through Confession. But by asking about excommunication and mortal sin, you are asking about two different but related things.
Hope that helps.