The Church has the right to forbid its members from joining Freemasonry because Freemasonry is incompatible with the Catholic faith. Christianity is not a religious philosophy to mix and match as you see fit. It is a truth claim about God and what he has revealed to man. It has non-negotiable standards. You either accept that or you do not.I think any religion that is so uncomfortable about itself as to oppose and discourage its members to try other things has some real confidence issues on its own plate.
Of course, the Church cannot actually stop anyone form joining a lodge. But by that same token the Church has no obligation to hold such persons in good standing.