The Catholic Church would recognize the possibility of salvation without actual water baptism, but not the possibility of salvation without baptism. Baptism can happen in three ways, the water variety being required normally. In cases where a person is not able to receive water baptism but is martyred, that is known as a baptism by blood.
The third way is known as a baptism by desire, and it occurs when a person, in response to God’s grace, truly desires to be with God and to follow God, but is unable to obtain baptism or does not know that it is required. God does not hold it against the person that he or she cannot obtain or is not aware of the need for baptism, and the person can be saved.
If the person later becomes aware of the need or it becomes possible for the person to obtain baptism and he refuses, this would constitute a grave sin and the person would not be saved, because he would have rejected God’s requirement for salvation. I don’t mean that in the sense as if God had a checklist, I mean it in the sense merely that salvation is on God’s terms, not ours. For example, someone may grow to love God greatly and desire to be with Him in Heaven, but when he learns that Jesus Christ is the only means of salvation, the person may say they still love God, but refuse to embrace Christ. That person would be saying they love God, but rejecting salvation on God’s terms and instead expecting to get it on their own terms. If God says baptism is the way that a person is incorporated into Christ’s body, and the person will not get baptised, then that person would similarly be rejecting salvation on God’s terms and rather seeking it on their own.
The key to understanding all of this is that in Catholic theology, all that matters is (truly) loving God. If a person loves God, then they will be saved. Now if a person loves God and can’t get baptism or doesn’t know it’s needed, that person still can be saved because they love God, which is all that matters. On the other hand, a person who knows baptism is necessary but refuses it or does not take the effort to receive it clearly does not truly love God, even if they profess it with their lips. Love is an action, and obviously true love always turns into acts.
To provide a simple example, imagine that a young girl told a suitor, whom professed his undying and committed love for her, that if he were to only ask her to marry him that she would say yes and love him forever. If the young fellow proposed, it would be clear that he loved her. However, assuming there were no other factors involved (such as family strife for instance), if the boy would refuse to ask her, or perhaps put it off for days or weeks or months out of mere laziness, then it would be evident that he did not really love her after all, regardless of what he professed.