As the Catholic Encyclopedia says, “In the New Testament anathema no longer entails death, but the loss of goods or exclusion from the society of the faithful.”
http://www.newadvent.org/cathen/01455e.htm
Heresy is a sin of separation that excludes one from being a member of the Church (aka being fully incorporated or being in full communion with the Church–the Baptismal bond always remains of course). (cf. CCC 817-818). So when the Council of Trent says “If any one says [X], let him be anathema” it is saying that a person who professes that error is committing heresy, which separates from the Church.
The Church has not abolished this theological truth about the necessity of the unity of faith in the unity of the Church, rather all it abolished was a certain ceremonial form of excommunication that was rarely used anyway (and had long fallen out of use completely). Theoretically this ceremony could have been applied to any of the baptized, since even baptized non-Catholics are subject to the jurisdiction of the Church by virtue of their baptism, but it was only ever applied to Catholics.
Heresy itself of course only applies to the baptized (see CCC 2089) (the unbaptized have no communion with the Church to be broken or wounded anyway).
I hope that helps!