I was told by a Catholic priest that a pope could get married if he wanted to, despite the law of celibacy, because the pope is "above the law." I don't know if that is true or if the priest was joking.
Of course it might cause some dissatisfaction among the lower clergy who were still required to keep the rule.