Canon 1258 It is not licit for the faithful by any manner to assist actively or have a part in the sacred [rites] of non-Catholics.
And then this.
Whoever in any manner willingly and knowingly helps in the promulgation of heresy, or who communicates in things divine with heretics against the prescription of canon 1258, is suspected of heresy (canon 2316, 1917 Code,).
And this.
One who is guilty of prohibited participation in [non-Catholic] religious rites is to be punished with a just penalty (canon 1365, 1983 Code).
Yet we see the popes actively participating in Muslim and other prayers etc.
True Traditional Catholics recognize the contradictions that you have pointed out.
I was recently asked by a close relative of mine to actively take part in his non-Catholic wedding. According to Traditional Catholic teaching, no can do. And it hurt like a you-know-what to say no to him.
Meanwhile the post-Vatican II popes would have encouraged me to say yes.