No, no Pope has ever taught the universal Church an error on faith and morals in an encyclical, let alone a heresy. That is why the most SSPX can come up with is to say that the Pope of the time excommunicated Athanasius. But excommunicating someone wrongly is not the same as teaching heresy or error to EVERYONE. I think it is plain to see that, if you believe a Pope can do this, you have effectively reduced the papacy to nothing. How could the man protected by the Holy Spirit and upon whom the Rock of the Church is built, who carries on the Deposit of Faith, lead you to hell?
The Holy Ghost only protects the Pope when he is speaking ex cathedra, some say; despite that most Popes never even say anything ex cathedra, meaning they are useless as teachers according to this line of logic. Personally I believe this is a new transmogrified form of Old Catholicism, a democratic take on Church government that reduces the Pope to a virtual zero. He is rendered so useless in this scheme of things, that bishops have veto power over him.
The famous example of a Pope teaching an error unofficially was John XXII saying that the saints don't enjoy the Beatific Vision until the end of time. But he only said this in sermons he gave, it was never taught to the universal Church nor could it have been. Yet he was still about to be declared a heretic until he repented.