I think that these are the relevant sections from the Catechism of the Catholic Church to answer your question: (highlighted boldface mine)
An indelible spiritual mark . . .
1272 Incorporated into Christ by Baptism, the person baptized is configured to Christ. Baptism seals the Christian with the indelible spiritual mark (character) of his belonging to Christ. No sin can erase this mark, even if sin prevents Baptism from bearing the fruits of salvation.83 Given once for all, Baptism cannot be repeated.
1273 Incorporated into the Church by Baptism, the faithful have received the sacramental character that consecrates them for Christian religious worship.84 The baptismal seal enables and commits Christians to serve God by a vital participation in the holy liturgy of the Church and to exercise their baptismal priesthood by the witness of holy lives and practical charity.85
1274 The Holy Spirit has marked us with the seal of the Lord (“Dominicus character”) "for the day of redemption."86 "Baptism indeed is the seal of eternal life."87 The faithful Christian who has “kept the seal” until the end, remaining faithful to the demands of his Baptism, will be able to depart this life "marked with the sign of faith,"88 with his baptismal faith, in expectation of the blessed vision of God - the consummation of faith - and in the hope of resurrection.
Who belongs to the Catholic Church?
836 "All men are called to this catholic unity of the People of God. . . . And to it, in different ways, belong or are ordered: the Catholic faithful, others who believe in Christ, and finally all mankind, called by God’s grace to salvation."320
837 "Fully incorporated into the society of the Church are those who, possessing the Spirit of Christ, accept all the means of salvation given to the Church together with her entire organization, and who - by the bonds constituted by the profession of faith, the sacraments, ecclesiastical government, and communion - are joined in the visible structure of the Church of Christ, who rules her through the Supreme Pontiff and the bishops. Even though incorporated into the Church, one who does not however persevere in charity is not saved. He remains indeed in the bosom of the Church, but ‘in body’ not ‘in heart.’"321
838 "The Church knows that she is joined in many ways to the baptized who are honored by the name of Christian, but do not profess the Catholic faith in its entirety or have not preserved unity or communion under the successor of Peter."322 Those "who believe in Christ and have been properly baptized are put in a certain, although imperfect, communion with the Catholic Church."323 With the Orthodox Churches, this communion is so profound "that it lacks little to attain the fullness that would permit a common celebration of the Lord’s Eucharist."324
2087 Our moral life has its source in faith in God who reveals his love to us. St. Paul speaks of the "obedience of faith"9 as our first obligation. He shows that “ignorance of God” is the principle and explanation of all moral deviations.10 Our duty toward God is to believe in him and to bear witness to him.
**2088 The first commandment requires us to nourish and protect our faith with prudence and vigilance, and to reject everything that is opposed to it. There are various ways of sinning against faith:
Voluntary doubt about the faith disregards or refuses to hold as true what God has revealed and the Church proposes for belief. Involuntary doubt refers to hesitation in believing, difficulty in overcoming objections connected with the faith, or also anxiety aroused by its obscurity. If deliberately cultivated doubt can lead to spiritual blindness.
2089 Incredulity is the neglect of revealed truth or the willful refusal to assent to it. "Heresy is the obstinate post-baptismal denial of some truth which must be believed with divine and catholic faith, or it is likewise an obstinate doubt concerning the same; apostasy is the total repudiation of the Christian faith; schism is the refusal of submission to the Roman Pontiff or of communion with the members of the Church subject to him."11**
So, in brief, once one is baptized, that person is configured to Christ in a unique way that (even if he ends up in hell) will mark him forever as a Christian (or Catholic). But we must persevere in the faith. Certainly, there will be struggles and doubts that come. There will be failings. Some manage to work through them. Others don’t. Many will live in ways or even advocate ideas which are seperate from fidelity, while convincing themselves that this is fine and unproblematic to a practice of Catholicism. Outright rejection of articles of faith may place one in bad standing with the unity of the faith. If this is taken to an extreme, one can place himself outside of the faith through heresy, apostacy, schism, even excommunication. But that indelible mark remains, nonetheless.