Here is the contradiction:
Lumen Gentium
.(128) Those also can attain to salvation who through no fault of their own do not know the Gospel of Christ or His Church, yet sincerely seek God and moved by grace strive by their deeds to do His will as it is known to them through the dictates of conscience.
"Whoever, therefore, is not united with it is not a member of it, nor does he communicate with its Head Who is Christ. No one is found in the one Church of Christ, and no one perseveres in it, unless he acknowledges and accepts obediently the supreme authority of St. Peter and his legitimate successors." (Pope Pius XI, Mortalium Animos 1928)
“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.)