(A similar question could be asked with respect to admitting Protestants to communion, but of course that question becomes a lot more complicated since Protestants are only admitted to communion in special circumstances.)
Only when dying, to be specific.
CCC 1400 notes that protestants are NOT included in the permissions to receive sacraments.
1398 The Eucharist and the unity of Christians. Before the greatness of this mystery St. Augustine exclaims, "O sacrament of devotion! O sign of unity! O bond of charity!"234 The more painful the experience of the divisions in the Church which break the common participation in the table of the Lord, the more urgent are our prayers to the Lord that the time of complete unity among all who believe in him may return.
1399 The Eastern churches that are not in full communion with the Catholic Church celebrate the Eucharist with great love. “These Churches, although separated from us, yet possess true sacraments, above all - by apostolic succession - the priesthood and the Eucharist, whereby they are still joined to us in closest intimacy.” A certain communion in sacris, and so in the Eucharist, "given suitable circumstances and the approval of Church authority, is not merely possible but is encouraged."235
1400 Ecclesial communities derived from the Reformation and separated from the Catholic Church, "have not preserved the proper reality of the Eucharistic mystery in its fullness, especially because of the absence of the sacrament of Holy Orders."236 It is for this reason that Eucharistic intercommunion with these communities is not possible for the Catholic Church. However these ecclesial communities, "when they commemorate the Lord’s death and resurrection in the Holy Supper . . . profess that it signifies life in communion with Christ and await his coming in glory."237
1401 When, in the Ordinary’s judgment, a grave necessity arises, Catholic ministers may give the sacraments of Eucharist, Penance, and Anointing of the Sick to other Christians not in full communion with the Catholic Church, who ask for them of their own will, provided they give evidence of holding the Catholic faith regarding these sacraments and possess the required dispositions.238
234 St. Augustine, In Jo. ev. 26, 13: PL 35, 1613; cf. SC 47.
235 UR 15 # 2; cf. ⇒ CIC, can. 844 # 3.
236 UR 22 # 3.
237 UR 22 # 3.
238 Cf. ⇒ CIC, can. 844 # 4.
vatican.va/archive/ENG0015/__P42.HTM
Based upon cannon 844 §4, and the comments of CCC 1400, it should be obvious that the protestant should be basically unable to receive without stated intent to convert to the Catholic faith.
CIC Can. 844 §1. Catholic ministers administer the sacraments licitly to Catholic members of the Christian faithful alone, who likewise receive them licitly from Catholic ministers alone, without prejudice to the prescripts of §§2, 3, and 4 of this canon, and ⇒ can. 861, §2.
§2. Whenever necessity requires it or true spiritual advantage suggests it, and provided that danger of error or of indifferentism is avoided, the Christian faithful for whom it is physically or morally impossible to approach a Catholic minister are permitted to receive the sacraments of penance, Eucharist, and anointing of the sick from non-Catholic ministers in whose Churches these sacraments are valid.
§3. Catholic ministers administer the sacraments of penance, Eucharist, and anointing of the sick licitly to members of Eastern Churches which do not have full communion with the Catholic Church if they seek such on their own accord and are properly disposed. This is also valid for members of other Churches which in the judgment of the Apostolic See are in the same condition in regard to the sacraments as these Eastern Churches.
§4. If the danger of death is present or if, in the judgment of the diocesan bishop or conference of bishops, some other grave necessity urges it, Catholic ministers administer these same sacraments licitly also to other Christians not having full communion with the Catholic Church, who cannot approach a minister of their own community and who seek such on their own accord, provided that they manifest Catholic faith in respect to these sacraments and are properly disposed.
§5. For the cases mentioned in §§2, 3, and 4, the diocesan bishop or conference of bishops is not to issue general norms except after consultation at least with the local competent authority of the interested non-Catholic Church or community.
vatican.va/archive/ENG1104/__P2T.HTM
This is the canon law. This is the rule for Roman Rite priests, Roman Rite laymen, and those approaching the Roman church.
Now, for the other rites, the following apply :
CCEO Canon 671
- Catholic ministers licitly administer the sacraments only to Catholic Christian faithful, who, likewise, licitly receive the sacraments only from Catholic ministers.
- If necessity requires it or genuine spiritual advantage suggests it and provided that the danger of error or indifferentism is avoided, it is permitted for Catholic Christian faithful, for whom it is physically or morally impossible to approach a Catholic minister, to receive the sacraments of penance, the Eucharist and anointing of the sick from non-Catholic ministers, in whose Churches these sacraments are valid.
- Likewise Catholic ministers licitly administer the sacraments of penance, the Eucharist and anointing of the sick to Christian faithful of Eastern Churches, who do not have full communion with the Catholic Church, if they ask for them on their own and are properly disposed. This holds also for the Christian faithful of other Churches, who according to the judgment of the Apostolic See, are in the same condition as the Eastern Churches as far as the sacraments are concerned.
- If there is a danger of death or another matter of serious necessity in the judgment of the eparchial bishop, the synod of bishops of the patriarchal Church or the council of hierarchs, Catholic ministers licitly administer the same sacraments also to other Christians not having full communion with the Catholic Church, who cannot approach the ministers of their own ecclesial communities and who request them on their own, provided they manifest a faith consonant with that of the Catholic Church concerning these sacraments and are rightly disposed.
- For the cases in 2, 3 and 4, norms of particular law are to be enacted only after consultation with at least the local competent authority of the non-Catholic Church or ecclesial community concerned.
intratext.com/IXT/ENG1199/_PIN.HTM
Note, they are almost word for word the same as the roman.