LUMEN GENTIUM is an infallible document from Vatican II:
DOGMATIC CONSTITUTION ON THE CHURCH
LUMEN GENTIUM
SOLEMNLY PROMULGATED BY HIS HOLINESS
POPE PAUL VI
ON NOVEMBER 21, 1964
CHAPTER II
ON THE PEOPLE OF GOD
15. The Church recognizes that in many ways she is linked with those who, being baptized, are honored with the name of Christian, though they do not profess the faith in its entirety or do not preserve unity of communion with the successor of Peter. (14*) For there are many who honor Sacred Scripture, taking it as a norm of belief and a pattern of life, and who show a sincere zeal. They lovingly believe in God the Father Almighty and in Christ, the Son of God and Saviour. (15*) They are consecrated by baptism, in which they are united with Christ.They also recognize and accept other sacraments within their own Churches or ecclesiastical communities.
Many of them rejoice in the episcopate, celebrate the Holy Eucharist and cultivate devotion toward the Virgin Mother of God.(16*) They also share with us in prayer and other spiritual benefits. Likewise we can say that in some real way they are joined with us in the Holy Spirit, for to them too He gives His gifts and graces whereby He is operative among them with His sanctifying power. . . . .
- Finally, those who have not yet received the Gospel are related in various ways to the people of God.(18*) In the first place we must recall the people to whom the testament and the promises were given and from whom Christ was born according to the flesh.(125) On account of their fathers this people remains most dear to God, for God does not repent of the gifts He makes nor of the calls He issues.(126)
But the plan of salvation also includes those who acknowledge the Creator. In the first place amongst these there are the Mohammedans, who, professing to hold the faith of Abraham, along with us adore the one and merciful God, who on the last day will judge mankind. Nor is God far distant from those who in shadows and images seek the unknown God, for it is He who gives to all men life and breath and all things,(127) and as Saviour wills that all men be saved.(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.(19*)
Nor does Divine Providence deny the helps necessary for salvation to those who, without blame on their part, have not yet arrived at an explicit knowledge of God and with His grace strive to live a good life. Whatever good or truth is found amongst them is looked upon by the Church as a preparation for the Gospel.(20*) She knows that it is given by Him who enlightens all men so that they may finally have life. . .
At certain points in history, it certainly seemed that Extra Ecclesiam Nulla Salus was aimed at those who were not subject to the Roman Pontiff. Some infallible teachings were very specific, and they didn’t leave much room for arguments of semantics regarding the definition of “Catholic,” or being “Catholic” without knowing it.
The Papal Bull of Pope Boniface VIII is a good example:
Pope Boniface VIII in his Papal Bull Unam Sanctam (A.D. 1302): “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.”
Link:
ewtn.com/library/PAPALDOC/B7UNAM.HTM
The Catholic Argument has been, at least on other threads, that the teaching of Vatican II does not contradict the infallible teachings of the past, but more fully defines them.
However, Catholic Traditionalists see Vatican II and EENS somewhat at odds: See Link:
catholicism.org/eens-popes.html
It’s a complicated subject.
Peace,
Anna