I answer that, Neither living nor lifeless faith remains in a heretic who disbelieves one article of faith.- Aquinas, Summa Theologica, Second Part of the Second Part, Treatise on the Theological Virtues, Question 5, Article 3
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.
The first key thing to see from this text is the following:
1) Aquinas views the Scriptures as the Primary Truth and the teachings of the Church as derivative truth
"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."
The key phrase is "the teaching of the Church, which proceeds from the First Truth." If the phrase were "which proceed" then it would mean that the "holy writ" also proceeds from the First Truth. Instead, the use of the singular verb "proceeds" shows us that the sense is that Holy Writ is the manifestation of the First Truth and that the teaching of the Church is a derivative manifestation of that first truth. In other words, the Church derives her teachings from Scripture.
2) Confirmation of (1)
We see confirmation of (1) almost immediately: "... the teaching of the Church, which proceeds from the First Truth manifested in Holy Writ ... ." This statement confirms that, to Aquinas, the Church's teaching is from Scripture. Consequently it is manifest that Aquinas viewed Scripture's authority as primary and the Church's authority as derivative.
3) Yes ... but
Aquinas nevertheless includes a comment suggesting that people should treat the teachings of the church as an infallible rule. Of course, Aquinas does not mean every teaching of the church, but rather teachings of the Church as to the articles of the faith. Aquinas also does not mean teachings of every individual church, but of "the Church," that is to say, the universal church.
4) What are we believing per Aquinas?
Aquinas views one's belief as being in the teachings of Scripture. In response to the second objection in the same question quoted above, Aquinas states: "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."
The rule of faith, for Aquinas is Scripture, as interpreted by the Church. But this interpretation is not arbitrary per Aquinas. It is a matter of objective reality. That is why, in the first article of the first question of this treatise, Aquinas stated: "Accordingly if we consider, in faith, the formal aspect of the object, it is nothing else than the First Truth."
Likewise, in the seventh article of that question, Aquinas does not teach that there has been any increase in the substance of the articles of faith over time but only in making explicit what was implicit: "Accordingly we must conclude that, as regards the substance of the articles of faith, they have not received any increase as time went on: since whatever those who lived later have believed, was contained, albeit implicitly, in the faith of those Fathers who preceded them. But there was an increase in the number of articles believed explicitly, since to those who lived in later times some were known explicitly which were not known explicitly by those who lived before them."
Finally, in the 10th article of that question, Aquinas makes it clear that he's specifically referring to the creed, as such. He poses the hypothetical objection that some of the church councils had forbidden under anathema for anyone to alter the creed and that consequently there could be no new edition of the symbol of faith. Aquinas dismisses this by arguing that the councils implicitly meant this simply for private individuals, and left open the possibility of future councils elaborating further: "This prohibition and sentence of the council was intended for private individuals, who have no business to decide matters of faith: for this decision of the general council did not take away from a subsequent council the power of drawing up a new edition of the symbol, containing not indeed a new faith, but the same faith with greater explicitness."