There are only two possible answers to this question: (A) Yes, he can, or (B) No, he cannot. Let’s consider both possibilities:
A. Suppose that the Pope, any valid Pope, can fall into heresy. What would the result be?
1. We could never be sure if any teaching of any Pope were a valid teaching of the Magisterium because a person can fall into heresy interiorly, without exterior expression.
2. We could never be sure that any teaching of any Ecumenical Council were a valid teaching of the Magisterium because a Council is only a Council if it has the Pope as its head.
3. We could never be sure that any teaching of the ordinary and universal Magisterium were a valid teaching of the Magisterium because the infallibility of the ordinary and universal Magisterium is not based solely on the agreement of the body of Bishops on one doctrine definitively to be held, but of the Pope as well.
4. If all infallible teachings were uncertain, due to the uncertainty as to whether the Pope were a heretic, the Magisterium would lose its infallibility. For infallibility is given to the Church by God for the purpose of securing our path of salvation. It would be purposeless to have a type of infallibility that could be exercised, but without the faithful being able to discern if it had been exercised.
5. Given that the heresy of a Pope would corrupt or invalidate the teachings of the Pope, a Council, and the ordinary and universal Magisterium, there is no authority on earth that could determine which Popes, if any, had fallen into heresy. Formal heresy is the obstinate denial or obstinate doubt of an infallible teaching of the Magisterium. By the Magisterium cannot be exercised by heretics. So each member of the Church would be left deciding which Popes and Councils had fallen into heresy, which had not, and which teachings were infallible.
The end result is that the individual believer would only accept a teaching as infallible if he or she agrees with the teaching. If the individual believer disagrees, then he simply claims that the Pope or Council has fallen into heresy. In such a case, the individual might say that he believes the Magisterium can teach infallibly, but with the proviso that a teaching is only infallible if the individual agrees it is true. In effect, the individual has made himself out to be the judge over the teachings of all Popes, Councils, and the ordinary and universal Magisterium. For whenever he thinks he sees an error, he can invalidate that teaching by claiming it is a heresy.
And this is exactly what has happened with some conservative Catholics and some liberal Catholics. Whenever they disagree with a teaching of the Magisterium, they simply claim that the Church is wrong and they are right. Conservatives in particular criticize liberals for this type of behavior, for rejecting definitive teachings of the Magisterium. But then they turn around and do the same. They denigrate and ridicule the teachings of the Second Vatican Council. They reject, ignore, or radically re-interpret any papal teaching with which they disagree. Although they claim that no one can legitimately disagree with the teachings of the Magisterium, they don’t hold any teaching to be truly of the Magisterium, unless they themselves judge and approve of that teaching. As a result, they are not truly taught by the Magisterium, and they are unable to be corrected in their errors, not even by a Pope or Council.
B. Suppose that neither any Pope, nor any Ecumenical Council, nor the body of Bishops in communion with the Pope, can ever possibly fall into heresy. What would the result be?
1. If any papal teaching meets the conditions for infallibility, taught by Vatican I and reiterated by Vatican II, we can be certain that the teaching is true. We are not left to decide for ourselves if the teaching is true or false. And if anyone disagrees, we will recognize that he is a heretic. Instead of making ourselves out to be infallible by judging every teaching and every Pope, we can rely on the teaching of Christ that the Pope is the Rock which secures the foundation of the Church against every storm, every evil.
2. and 3. The same is true for infallible teachings of Councils and of the ordinary and universal Magisterium. These teachings are secured by our faith in the Holy Spirit, who teaches through Popes and Councils and the body of Bishops. To say otherwise is to make yourself a judge over the Holy Spirit, to decide which of His teachings are true and which are false.
4. Our path to salvation is secured, if Popes, Councils, and the body of Bishops are all prevented by the Holy Spirit from falling into heresy. For we need not question whether each infallible teaching is truly of the Magisterium, or is false, heretical and therefore not infallible, just as we need not question each teaching of Christ, as if some could be errors and others truths.
5. Unfortunately, for us sinners, for us arrogant, self-exalting, overly-confident, wavering disciples of Christ, all this implies that if a Pope or Council or (most commonly) the ordinary and universal Magisterium teaches infallibly, and we disagree, then we must be in the wrong. We must change our own views and adhere to the teachings of Christ through His Church. And no one likes to admit they were wrong, no one likes to accept correction and change.
And this last reason (B.5.) is exactly why so many Catholics adhere to the untenable notion that a Pope, or Council, or the body of Bishops united to the Pope can possibly fall into heresy. The idea prevents them from having to accept teaching and correction from the Church. It in effect lets them be judges over every Pope, every Council, and the body of Bishops.
Now suppose that a Pope or Council or the ordinary and universal Magisterium were to teach (B), that neither the Pope, nor any Ecumenical Council, nor the body of Bishops in communion with the Pope can ever fall into heresy. Those Catholics who think otherwise would simply claim that the Pope or Council or body of Bishops had fallen into heresy.
Sooner or later, a Pope is going to teach INFALLIBLY a true teaching of Tradition and Scripture, one which nonetheless is viewed as an error by conservative Catholics. And many of them will fall away from the Church. The same will inevitably happen in the case of liberal Catholics. When will this happen? Which Pope will teaching infallibly, in contradiction to conservatives or liberals? I believe it will be Pope Francis, and I believe it will happen this year (2013).