That’s not true at all. Priests have never had a right to heir parishioners’ confidential information. The reason the popes have forbidden joining the lodges is that freemasonry is against the Faith.
Missouri Senate Lutheran here. Orthodox Christianity always opposed gnosticism: no secret oaths and rituals; no esoteric knowledge; no elite with private knowledge hidden from either the general public or lower level members of the church. Christianity was and is an open faith. The creeds are publicly stated. All teachings are to be shared openly with all who will listen. The faith is fully consistent with right reason and is to be proclaimed and defended in the public square. The only way to square Masonic practices with Christianity is for all concerned to pretend that it’s all just an elaborate game of make believe and that oaths don’t matter. A lot of people are quite ready to do this.
I have several good friends who are Masons. They are fine fellows and most are at least nominally Christian. (Episcopalian mostly.) When asked, they take the line that Masonry is just a fraternal organization with colorful traditions and costumes, and it is mostly a fellowship that does good works. But they won’t break their vows of secrecy.