No, not exactly. Fr. James T. O’Connor, a respected authority on dogmatic and sacramental theology, explains the Church’s position.
Because the Lord's body and blood are not substantially present, a Catholic is never permitted to partake of the communion services in such [Protestant] celebrations of the Lord's Supper. On the other hand, like the Lord himself, when he marveled at the faith of the Syro-Phoenician woman [Mt 15:21-28], the Church does not refuse to take from her table that by which she lives and feed those who stand outside. In specific circumstances individual baptized Christians who are not Catholic may be permitted to receive the Eucharist in the Catholic Church.
According to the norms of the Church, the conditions for such an occurrence are: 1. There must exist a danger of death or some grave and urgent need. 2. A spontaneous request must be made by the baptized non-Catholic. 3. The non-Catholic Christian must be unable to approach a minister of his own Christian community. 4. The person must be suitably disposed spiritually and have shown that he shares the Faith of the Catholic Church in respect to the Eucharist. (The Hidden Manna [San Francisco: Ignatius Press, 1988], 165).
So far, what your pastor said is reasonably though not completely in line with what the Church teaches. Fr. O’Connor goes on to explain that, “All the conditions must be simultaneously fulfilled” (Manna, 165). In other words, the first of the four criteria O’Connor outlines, imminent danger of death or some other grave urgency, must be present along with the other three for the Protestant to licitly receive Communion.
Church laws dealing with non-Catholic Christians receiving Communion are found in the Code of Canon Law, canon 844, section 4, and the Instruction issued by the Secretariat for Christian Unity (for English text see The Pope Speaks, 17, No. 2, 173-179 [Huntington, Indiana: Our Sunday Visitor]. For Latin original see Acta Apostolicae Sedis, vol. 64 , 518-525).