Pope Leo XIII taught in Satis Cognitum (SC) 5: “‘It happens that, as in the human body, some member may be cut off a hand, a finger, a foot. Does the soul follow the amputated member? As long as it was in the body, it lived; separated, it forfeits its life. So the Christian is a Catholic as long as he lives in the body: cut off from it he becomes a heretic – the life of the spirit follows not the amputated member’ (S. Augustinus, Sermo cclxvii., n. 4).”
The pope continues in SC 8: “‘Our Lord Jesus Christ, when in His Gospel He testifies that those who not are with Him are His enemies, does not designate any special form of heresy, but declares that all heretics who are not with Him and do not gather with Him, scatter His flock and are His adversaries: He that is not with Me is against Me, and he that gathereth not with Me scattereth’ (S. Cyprianus, Ep. lxix., ad Magnum, n. I).”
In both instances, Pope Leo XIII is describing public heretics for he uses the analogies of the body and its members and the flock which gathers or scatters.
So the public heretic is not a Catholic and member of the Church.
Therefore, a Catholic cannot privately believe his pope is a public heretic for it would mean that he privately believes his pope is not a Catholic and member of the Body of the Church. A non-Catholic and non-member of the Catholic Church can’t be at the same time the Head of the Catholic Church.
Ironically, those members of the Vatican 2 religion who have privately judged their Vatican 2 pope to be a heretic have made a judgment against the judgment of their church, which they argue is a dogmatic fact and call a heresy and mortal sin for rejecting.
See here.