If he’s actually the Pope, that cannot happen, due to Papal infallibility. The Sedevacantists get around this by saying, due to their heresies, they aren’t really Popes.
Just to clarify, Papal Infallibility does
not mean the Pope is protected from erring whenever he is teaching on matters of faith and morals. That is a common misconception. What it does means is that a Pope is protected from error
when he defines a doctrine of faith or morals to be held by the Universal Church. Those are the guidelines set down by Vatican I for the requirements for Papal Infallibility. The new Catechism uses the term “definitive act” to refer to the act of defining a dogma. Outside of the guidelines set down by Vatican I, a Pope can err. To say he can’t is to assert what the Church does not teach.
Pope Adrian VI: “If by the Roman Church you mean its head or pontiff, it is beyond question that he can error even in matters touching the faith. He does this when he teaches heresy by his own judgment or decretal. In truth, many Roman pontiffs were heretics. The last of them was Pope John XXII (1316-1334).” (Quaest. in IV Sententiam).
Pope Adrian VI: "After his death [Pope] Honorius was anathematized by the Eastern Church. We must remember that he was accused of heresy, a crime which legitimizes the resistance of inferiors to superiors, together with the rejection of their pernicious doctrines. (Allocution III, Lect. In Conc. VIII, act. VII)
It is not normal for a Pope to err in matters touching faith and morals, but it can happen. And when it does, he is not to be followed. I’ll give just one example of a Pope teaching an error.
John Paul II publicly taught that we do not know whether individual humans will go to hell.
John Paul II: "“Eternal damnation remains a possibility, but we are not granted, without special divine revelation, the knowledge of whether or which human beings are effectively involved in it [hell].” (General Audience — July 28, 1999)
We know this is an error since Pope Pius II condemned the proposition that “all Christians will be saved”. If all Christians are not saved, it follows that some must be damned; and if some are damned, we* do know *that some human beings will go to hell. We may not know which souls are damned, but we do know that some are.