The continuing prohibition of Catholics ascending the throne has its basis in the 1689 Bill of Rights:
"An Act Declaring the Rights and Liberties of the Subject and Settling the Succession of the Crown." (first line of the Act).
Predominantly, it imposed strict limits on the use of the Royal Prerogative by the sovereign, gave full legislative power to Parliament, and barred Roman Catholics from the Throne.
The Act of Settlement, 1701, was passed, basically, to ensure a stable executive for the legislative branch of government, ie. Parliament.
* It prohibited the accession of Catholics, the illegitimate and adopted children
* The sovereign must be in communion with the Church of England and swear to uphold the Protestant succession
* It established the descendants of Sophia of Hanover as the legal heirs to the throne, but only if Protestant
The only way that these laws can be overturned is through legislation passed in the national parliaments of the 17 countries (Statute of Westminster 1931) where the Queen is head of state. If Her Majesty, her heirs and successors, wish to remain Head of State of these countries, then they must all approve, legally, any and all change.
Incidentally, it's also why Camilla will be Queen Camilla, despite any other silly and meaningless title bestowed on her, when and if Charles becomes King, and why Britain hasn't abolished male-preference primogeniture: it all seems just too cumbersome and unwieldy. Many people throughout the world do not appreciate (how could they?) how complicated changing the laws in relation to the BRF and succession will be and I can't think of any other ruling house in this complex position.
If Britain were to act unilaterally, informed opinion in the UK is that it would split the Commonwealth and divide allegiance to the Crown as the law would not automatically apply in Her Majesty's other realms. I do not think it possible that any politician would relish being held responsible for the disintegration of the Commonwealth; indeed, it's been reported that Charles himself has expressed dismay that he may be remembered as the King who lost the dominions, if, as it's becoming clearer in Australia, it's his mother who is the only bulwark against republicanism.
Whereas as one would have hoped that times had changed from those frightened and bigoted days which saw Catholicism proscribed (after all Guy Fawkes has been dead for 400 years), I understand that legal moves were instigated in Canada, quite recently, to remove religious discrimination in the succession, but that it failed. Perhaps Canadians here can enlighten us?