I should also mention that Thomas Aquinas was a theologian in the Church. In The Catholic Way
by Bishop Donald Wuerl he says, "Theologians and scholars teach the word and help the Church to penetrate its full meaning. They are not official
teachers in the way that bishops, the successors of the apostles, are; theologians do not receive with the bishops that "sure gift of truth" (Dei Verbum
8) that apostolic witnesses to faith receive. But they are important companions of faith, for bishops look to scholars for appropriate assistance in understanding divine revelation."
Another important point to remember is that in Aquinas' time, the Immaculate Conception was a tradition of the Church but was not a required belief. It did not become doctrine (thus a required belief) until the 19th century.
Here's more: http://www.cin.org/jp960612.html
"Down the centuries, the conviction that Mary was preserved from every stain of sin from her conception, so that she is to be called all holy, gradually gained ground in the liturgy and theology. At the start of the 19th century, this development led to a petition drive for a dogmatic definition of the privilege of the Immaculate Conception."