According to our Faith, the Bible and the teaching of the Catholic Church can not contradict each other. The problem you suggest, for Catholics, does not exist, as conflicts can not exist. Protestants accept the doctrine of sola scriptura. This doctrines teaches that the Scriptures alone serve as a doctrinal and moral authority for Christians. It denies that Christians can hold as fundamentals of Faith anything not found in Scripture. There are three major problems with this doctrine:
A) If Scripture is the only authority a Christian has, the Christian must rely upon fallible interpretations of men. This has led to great splintering in Protestant traditions. Look at all the different denominations. Dozens of interpretations are suggested, as there is no authority, outside of Scripture, to tell believers which interpretation is correct.
B) Sola scriptura teaches that the Bible is the only authority Christians have. There’s a problem. How can one accept that the Bible is the only authority on faith and morals God gave us, when the Bible itself never teaches this? If a Christian is not suppose to accept teachings not found in Scripture, then how can he or she be sure that Scripture is the only authority?
C) If the Bible is the only authority, then how can a Christian know for sure which books should be included in the Bible? The Bible is a collection of books, and no where does it list it’s “table of contents”, if you will. The early Church agreed largely upon the canon (list) of books that belong in the Bible, but they disagreed in some areas. Even today, the Catholic Church, Orthodox Churches, and Protestant Churches have slightly different contents in their Bibles.
So the Catholic Church (and the Eastern and Oriental Orthodox Churches) rejects sola scriptura, and always has. We believe that Divine Revelation (the teachings God has revealed to His people through His Son and the Apostles 2000 years a go) is found in three places: Sacred Scripture (the Bible), Sacred Tradition and the Magisterium. These three ‘pillars of Truth’ can not contradict each other, for all three come from the Holy Spirit. Sacred Tradition refers to that body of teaching the Apostles passed down to the first bishops, but did not necessarily record in a book of Scripture. The Holy Spirit, the Church believes, guides the bishops, to ensure that these teachings are accurately passed down from generation to generation. The writings of the early Church Fathers verify many of these traditions not explicitly taught in Scripture. The Magisterium refers to the “teaching authority” of the Church. This is the pope and the bishops teaching and interpreting the Faith that has been handed down to us. The Holy Spirit guides the Magisterium, and will not let it fall into error. (Don’t get me wrong, individual bishops can be wrong on certain points of doctrine, and so can popes, but when a pope, or a Council of all bishops gathered together, solemnly defines a doctrine, the Spirit will not allow them to declare falsehood).
So basically, God has given us two bodies of Truth: Sacred Scripture and Sacred Tradition. He has also given us the Church to faithfully interpret these two bodies for all ages. As St. Paul said, the Church is the “pillar and foundation of Truth” (1 Tim. 3:15).
I invite you to take a look at some of these articles/pages: