According to the Catholic Church is it offensive to dress as a Catholic priest and perform “communion”?
Context plays a major part here.
If a person who not a priest and is genuinely deceiving the faithful and is pretending to say Mass is be excommunicated. Rome takes this very seriously.
Can. 1378 §1 A priest who acts against the prescription of Can. 977 incurs a latae sententiae excommunication reserved to the Apostolic See.
§2 The following incur a latae sententiae interdict or, if a cleric, a latae sententiae suspension:
1° a person who, not being an ordained priest, attempts to celebrate Mass
2° a person who, apart from the case mentioned in §1, thoughunable to give valid sacramental absolution, attempts to do so, or hears a sacramental confession.
§3 In the cases mentioned in §2, other penalties, not excluding excommunication, can be added, according to the gravity of the offence.
Once again circumstances mean everything:
Playing the part of a priest in a movie and celebrating a mass is simply role playing the part of what the actor is destined out to perform his role in a particular movie or theatrical piece.
Now it happens that Bishop Basil Meeking, played the part of Pope Leo XIII in the 2004 movie Thérèse: The Story of Saint Thérèse of Lisieux
I highly doubt that anyone would be offended with Bishop Meeking portraying Pope Leo XIII in a movie as such.
Another movie called titled Catholics has several actors playing the role of priests, monks and Vatican officials. It is quite entertaining to watch if the subject matter interests you:
A young American priest (Martin Sheen), is sent to the island to persuade the Abbot (Trevor Howard) that the Abbey should desist in the old ways. For by continuing to practice the Latin Mass, the priests of Muck Abbey have cast a shadow upon the Roman Catholic Church's ecumenical effort to merge with Buddhism! Large crowds of tourists from all parts of the world and TV coverage of their services by the BBC make it imperative that the intransigent Irish Monks be brought into line before their practices are interpreted as a Catholic counter-revolution. The Abbot is the man-in-the-middle, torn between the sincere beliefs of his fellows and his feelings of obedience to the wishes of his superiors. The confrontation of Kinsella's liberal and progressively streamlined vision of the Church and the hard-line conservatism of the monks forms the central tension in "Catholics."
Impersonating a priest or bishop, in real life is quite another matter.
Erwin Mena did this vary thing for for many years and even said Masses which for obviously reasons not valid. He fooled almost everyone.
It is obviously immoral and highly offensive to Catholics to pretend to be a priest and attempt to fool the faithful that one as one is saying a valid mass, when the truth is the very opposite.
We can see that already with the Second Lateran Council (1139) that ”women who are not following the rule of Benedict, Basil or Augustine, and pose as nuns and receive guests and secular persons in violation of good morals” are to be excommunicated. If women who pose a nuns are to be excommunicated, would not the same hold to men who posed as priests and tried to say mass.
Years ago, Archbishop James Carney of Vancouver insisted that visiting priests from other dioceses, desiring to say Mass and celebrate other sacraments within the Archdiocese of Vancouver had to get permission from himself. At the time he was almost the only bishop to do so. But then again, Canon Law was on his side.
Can. 903 A priest is to be permitted to celebrate the Eucharist, even if he is not known to the rector of the church, provided either that he presents commendatory letters, not more than a year old, from his own Ordinary or Superior, or that it can be prudently judged that he is not debarred from celebrating.
Not every time a man pretends to dress up as a priest and say Mass is an action that would be considered offensive, as context means everything. But if one was out to deceive the faithful and pretend to say an actual Mass, then yes it would be highly offensive to the faithful, as well as an excommunicable offence.
A little unverifiable trivia: A close friend of mine from the Vatican once told my that depending on circumstances, the personal bodyguards of the Holy Father will don cassocks, in order to protect the pope. Do not know how true it is, but I can see it happening.