To resist/oppose the edicts of the Pope is grounds for excommunication.
The level of authority behind any papal statement--- whether it's something as weighty as an Apostolic Constitution of Encyclical, or something as everyday as a weekday Homily from Domus Sta. Martae or remarks at a Papal Audience --- depends on the teaching's dogmatic history, and the intention of the pope.
Not everything the pope says is an "edict." Not even everything he says in an encyclical is an "edict."
Fortunately, in the history of the Church, when we have had really bad popes (8 or 9 of them, really wicked, by my quick and inexpert count) they were generally not interested in doctrine. That is to say, the truly criminal and startlingly crappy popes were interested in raiding their neighbor's castles, embezzling revenue, selling benefices, coddling their mistresses, and ennobling their nonmarital offspring.
We have NOT had bad popes --- so far! ---who were "into" heretical theology, just damned filthy conduct. For which, Deo gratias.