This is actually a more complicated matter than many good Catholics even think.
The teaching of the Church is constant: Outside herself, there is absolutelty no salvation whatever.
In order to enter into the Church, one must have three things: 1. Catholic faith, 2. valid baptism, and 3. communion with the Roman Pontiff.
Now, as you point out, the Council of Florence quotes the Athanasian Creed that whosoever does not hold the Catholic Faith fully will be damned. This is correct. Without the Faith, there is no means of justification of sins, and since even original sin alone will condemn to hell, everyone stands in need of justification.
Now, as to what needs to be believed explicitly vs. what needs to be believed implicitly, the Church has generally taught that there are four fundamental mysteries that embody the Faith that need to be believed explicitly by all: 1) that there is one God, incorporeal, eternal and benevolent, Who created all things, 2) that God is a good and just judge, and that He rewards the good, and punishes the wicked, 3) that this one God is three Divine Persons, Father, Son and Holy Spirit, distinct from each Other, yet each fully God, 4), that Jesus Christ, God the Son, true God and true man, came into this world, was born of the Virgin Mary, suffered and died on the Cross for man’s salvation, resurrected on the third day, ascended into heaven, that He will come again to judge the world, when all the dead will rise with their bodies. In short, every Christian is obliged to know and have a basic yet sufficient understanding of the articles of the Creed.
Now, of these four principal mysteries, any person of sound reason can come to know the first two without the aid of Divine Revelation and hence the author of Hebrews says “He that wishes to draw near to God must believe that He is, and that He is a rewarder o those Who seek Him” (Heb. 11:6). No one of normal reason can be excused from believing in these truths, wherever he may be in the world.
Now, the Trinity and Incarnation and Paschal Mysteries must be believed explicitly as well (cf. S. Th. II-II, q. 2, a. 7-8; Rom. 10:14). However, one may rightly ask, how can someone believe in these explicitly, who has never had them presented in such a way as He can understand? To this the Church responds: For a man who has never heard of these mysteries, he is not bound to believe in these mysteries explicitly. Pope Boniface VIII codified the dictum Nemo potest ad impossible obligari - “No one can be bound to the impossible” - in his 1298 Regulae Juris. The man would still be bound to believe in the two mysteries (mysteries 1 and 2 above) which all can without aid of revelation, and make an act of supernatural Faith in God. Now, if such a man, believed faithfully in these mysteries, and did his best to live up to the dictates of his conscience, repenting to God when/if he fell, then God would find some way to bring him to the explicitly. He would either send someone (the best), if not a member of the Church, then an angel from heaven, or He would simply preach it to Him by an internal inspiriation. This is precisely what the Second Vatican Council declared by saying what it says in the quote you provide from Lumen Gentium.
Notice, it does not say those who have never believe explcitly, but only those who have not yet believed explicitly. A famous scholastic axiom declares: Facienti quod est in se, non denegat Deus gratiam - To the one who does what is in his power, God does not deny the grace. This applies to the religious truths as well. If a man believes what he can, and do what conscience commands, God will not leave there to perish in his ignorance, but will, by “ways known to God Himself” lead him to a knowledge of the necessary truths of salvation.
If this faith, is animated by charity of God (which implicity includes the will to do all God commands, such as being baptized an being in communion with the Church), and he dies in this state of grace, he will be saved. This is called baptism of desire, and it’s sufficiency for salvation can be proven by the decree Apostolicam Sedem by Pope Innocent II (r. 1130-1143):
To your inquiry we respond thus: We assert without hesitation (on the authority of the holy Fathers Augustine and Ambrose) that the priest whom you indicated (in your letter) had died without the water of baptism, because he persevered in the faith of holy mother the Church and in the confession of the name of Christ, was freed from original sin and attained the joy of the heavenly fatherland. Read (brother) in the eighth book of Augustine’s “City of God” * where among other things it is written, “Baptism is ministered invisibly to one whom not contempt of religion but death excludes.” Read again the book also of the blessed Ambrose concerning the death of Valentinian * where he says the same thing. Therefore, to questions concerning the dead, you should hold the opinions of the learned Fathers’ and in your church you should join in prayers and you should have sacrifices offered to God for the priest mentioned.
- Pope Innocent II, Apostolicam Sedem D 388
By priest, we must assume that he meant someone studying to be one, or thought to be one, but the principle holds.
Pope Innocent III (r. 1198-1216) declares similarly in his letter Debitum Pastoralis Officii of August 28, 1206 D 413.
Anyone believes these truths and is baptized, and does not willfully separate himself from the Church, is connected in some way to the mystical Body of Christ, and will be saved, provided they die in a state of grace.
Sorry about the long post, but it is complicated,