They do not hesitate to put forward the view which is not only opposed to the Catholic Church, but very pernicious for the salvation of souls an opinion which Gregory XVI, Our Predecessor, called absurd. This is the view that liberty of conscience and worship is the strict right of every man, a right which should be proclaimed and affirmed by law in every properly constituted state... When they rashly make these statements, they do not realize or recall to mind that they are advocating what St. Augustine calls a liberty of perdition -Pope Pius IX, Quanta Cura
Religious liberty, Vatican II to present:
This Vatican Council declares that the human person has a right to religious freedom... The Council further declares that the right to religious freedom has its foundation in the very dignity of the human person, as this dignity is known through the revealed Word of God and by reason itself. This right of the human person to religious freedom is to be recognized in the constitutional law whereby society is governed; thus it is to become a civil right. - Vatican II
That sounds to me like a declaration of religious freedom from civil authority as we have in the United States, not the right to self-declaration as to what religion is. The protestant revolution took care of that!