There’s two concepts at issue here–freedom from coercion by the state when coming to the faith, which should be free (within due limits) and proclaiming a right to profess a false religion.
The Catechism explains:
**2108 **The right to religious liberty is neither a moral license to adhere to error, nor a supposed right to error,37 but rather a natural right of the human person to civil liberty, i.e., immunity, within just limits, from external constraint in religious matters by political authorities. This natural right ought to be acknowledged in the juridical order of society in such a way that it constitutes a civil right.38
**2109 **The right to religious liberty can of itself be neither unlimited nor limited only by a “public order” conceived in a positivist or naturalist manner.39 The “due limits” which are inherent in it must be determined for each social situation by political prudence, according to the requirements of the common good, and ratified by the civil authority in accordance with "legal principles which are in conformity with the objective moral order."40
37 Cf. Leo XIII, Libertas praestantissimum 18; Pius XII AAS 1953, 799.
38 Cf. DH 2.
39 Cf. Pius VI, Quod aliquantum (1791) 10; Pius IX, Quanta cura 3.
40 DH 7 # 3.
Again, I highly recommend reading the various links I provided above–they really help to understand this issue.