Catholics: Before going to Mass, take this quiz to avoid repeating the mistakes of Joe Biden and Nancy Pelosi.
Image by Chris Ritter/Buzzfeed
Not exactly. The Church Code of Canon Law says that those who "have been excommunicated or interdicted after the imposition or declaration of the penalty and others obstinately persevering in manifest grave sin" are not to receive Communion and there are a LOT of grave (or mortal) sins. Catholics are supposed to examine their conscience and consult a priest.
Catechism of the Catholic Church 1857: "For a sin to be mortal, three conditions must together be met: "Mortal sin is sin whose object is grave matter and which is also committed with full knowledge and deliberate consent."
Catechism of the Catholic Church 1385:
To respond to this invitation [to the Eucharist] we must prepare ourselves for so great and so holy a moment. St. Paul urges us to examine our conscience: "Whoever, therefore, eats the bread or drinks the cup of the Lord in an unworthy manner will be guilty of profaning the body and blood of the Lord. Let a man examine himself, and so eat of the bread and drink of the cup. For any one who eats and drinks without discerning the body eats and drinks judgment upon himself." Anyone conscious of a grave sin must receive the sacrament of Reconciliation before coming to communion.
A person who is conscious of grave sin is not to celebrate Mass or receive the body of the Lord without previous sacramental confession unless there is a grave reason and there is no opportunity to confess; in this case the person is to remember the obligation to make an act of perfect contrition which includes the resolution of confessing as soon as possible.
TL;DR: It's a mortal sin, but only if you knowingly receive communion with the full understanding that you shouldn't be participating.