The following is taken from the Summa Theologica, IIa-IIae, Q.5, A.3. I think this is extremely important in this day and age, when even many who call themselves Catholics erroneously hold that Protestants and those outside the Church can have retained some authentic bit of the virtue of faith, and hence that non-Catholic religions and Protestant denominations can provide salvation. The actual teaching of the Church on the subject is expressed very well here by the Angelic Doctor. Do read.
Whether a man who disbelieves one article of faith, can have lifeless faith in the other articles?
Objection 1. It would seem that a heretic who disbelieves one article of faith, can have lifeless faith in the other articles. For the natural intellect of a heretic is not more able than that of a catholic. Now a catholic's intellect needs the aid of the gift of faith in order to believe any article whatever of faith. Therefore it seems that heretics cannot believe any articles of faith without the gift of lifeless faith.
Objection 2. Further, just as faith contains many articles, so does one science, viz. geometry, contain many conclusions. Now a man may possess the science of geometry as to some geometrical conclusions, and yet be ignorant of other conclusions. Therefore a man can believe some articles of faith without believing the others.
Objection 3. Further, just as man obeys God in believing the articles of faith, so does he also in keeping the commandments of the Law. Now a man can obey some commandments, and disobey others. Therefore he can believe some articles, and disbelieve others.
On the contrary, Just as mortal sin is contrary to charity, so is disbelief in one article of faith contrary to faith. Now charity does not remain in a man after one mortal sin. Therefore neither does faith, after a man disbelieves one article.
I answer that, Neither living nor lifeless faith remains in a heretic who disbelieves one article of faith.
The reason of this is that the species of every habit depends on the formal aspect of the object, without which the species of the habit cannot remain. Now the formal object of faith is the First Truth, as manifested in Holy Writ and the teaching of the Church, which proceeds from the First Truth. Consequently whoever does not adhere, as to an infallible and Divine rule, to the teaching of the Church, which proceeds from the First Truth manifested in Holy Writ, has not the habit of faith, but holds that which is of faith otherwise than by faith. Even so, it is evident that a man whose mind holds a conclusion without knowing how it is proved, has not scientific knowledge, but merely an opinion about it. Now it is manifest that he who adheres to the teaching of the Church, as to an infallible rule, assents to whatever the Church teaches; otherwise, if, of the things taught by the Church, he holds what he chooses to hold, and rejects what he chooses to reject, he no longer adheres to the teaching of the Church as to an infallible rule, but to his own will. Hence it is evident that a heretic who obstinately disbelieves one article of faith, is not prepared to follow the teaching of the Church in all things; but if he is not obstinate, he is no longer in heresy but only in error. Therefore it is clear that such a heretic with regard to one article has no faith in the other articles, but only a kind of opinion in accordance with his own will.
Reply to Objection 1. A heretic does not hold the other articles of faith, about which he does not err, in the same way as one of the faithful does, namely by adhering simply to the Divine Truth, because in order to do so, a man needs the help of the habit of faith; but he holds the things that are of faith, by his own will and judgment.
Reply to Objection 2. The various conclusions of a science have their respective means of demonstration, one of which may be known without another, so that we may know some conclusions of a science without knowing the others. On the other hand faith adheres to all the articles of faith by reason of one mean, viz. on account of the First Truth proposed to us in Scriptures, according to the teaching of the Church who has the right understanding of them. Hence whoever abandons this mean is altogether lacking in faith.
Reply to Objection 3. The various precepts of the Law may be referred either to their respective proximate motives, and thus one can be kept without another; or to their primary motive, which is perfect obedience to God, in which a man fails whenever he breaks one commandment, according to James 2:10: "Whosoever shall . . . offend in one point is become guilty of all."