Outside the Church there is no salvation (extra ecclesiam nulla salus) is a doctrine of the Catholic Faith that was taught By Jesus Christ to His Apostles, preached by the Fathers, defined by popes and councils and piously believed by the faithful in every age of the Church. Here is how the Popes defined it:
There is but one universal Church of the faithful, outside which no one at all is saved. (Pope Innocent III, Fourth Lateran Council, 1215.)
We declare, say, define, and pronounce that it is absolutely necessary for the salvation of every human creature to be subject to the Roman Pontiff. (Pope Boniface VIII, the Bull Unam Sanctam, 1302.)
The most Holy Roman Church firmly believes, professes and preaches that none of those existing outside the Catholic Church, not only pagans, but also Jews and heretics and schismatics, can have a share in life eternal; but that they will go into the eternal fire which was prepared for the devil and his angels, unless before death they are joined with Her; and that so important is the unity of this ecclesiastical body that only those remaining within this unity can profit by the sacraments of the Church unto salvation, and they alone can receive an eternal recompense for their fasts, their almsgivings, their other works of Christian piety and the duties of a Christian soldier. No one, let his almsgiving be as great as it may, no one, even if he pour out his blood for the Name of Christ, can be saved, unless he remain within the bosom and the unity of the Catholic Church. (Pope Eugene IV, the Bull Cantate Domino, 1441.)
846 How are we to understand this affirmation, often repeated by the Church Fathers?335 Re-formulated positively, it means that all salvation comes from Christ the Head through the Church which is his Body:
Basing itself on Scripture and Tradition, the Council teaches that the Church, a pilgrim now on earth, is necessary for salvation: the one Christ is the mediator and the way of salvation; he is present to us in his body which is the Church. He himself explicitly asserted the necessity of faith and Baptism, and thereby affirmed at the same time the necessity of the Church which men enter through Baptism as through a door. Hence they could not be saved who, knowing that the Catholic Church was founded as necessary by God through Christ, would refuse either to enter it or to remain in it.336
847 This affirmation is not aimed at those who, through no fault of their own, do not know Christ and his Church:
Those who, through no fault of their own, do not know the Gospel of Christ or his Church, but who nevertheless seek God with a sincere heart, and, moved by grace, try in their actions to do his will as they know it through the dictates of their conscience - those too may achieve eternal salvation.337 (Catechism of the Catholic Church)
So, tell me, which Pope is right? One says only those who submit to the Pope can be saved while another says non-Catholic Christians ARE Christians and can be saved outside of being members of the Roman Catholic church. How can they all be infallible yet contradict each others own ex cathedra pronouncements?