Jesus Saves: He has the power to do this by fiat
Which renders the question of baptism moot.
From the Apostle's Creed (shared by many Christian denominations)
He suffered under Pontius Pilate, was crucified, died, and was buried.
He descended to the dead. On the third day he rose again.
He ascended into heaven, and is seated at the right hand of the Father.
He will come again to judge the living and the dead.
This is a case where he pronounced judgment on one of the living. Your question covers one instance. While Jesus was on Earth, exercising His power as the one who administers Final Judgment fits his being The Son. He had the power while on Earth to forgive sins. (Matthew 9:6)
6 But that you may know that the Son of Man has authority on earth to
forgive sins" - he then said to the paralytic, "Rise, pick up your
stretcher, and go home.
Another instance of making a similar ruling for one of the living is in Luke 7:50.
After sharing the parable of the two debtors with Simon, Jesus tells the woman that she is saved.
But he said to the woman, "Your faith has saved you; go in peace."
Nobody questions her salvation either, since Jesus decreed it. Whether or not she was baptized (as a follower of Jesus, she may well have been) is moot because Jesus Saves.
Let's look at the thief on the cross again. He professies his faith that Jesus is the Messiah, the Annointed one.
39 Now one of the criminals hanging there reviled Jesus, saying, "Are
you not the Messiah? Save yourself and us." 40 The other, however,
rebuking him, said in reply, "Have you no fear of God, for you are
subject to the same condemnation? 41 And indeed, we have been
condemned justly, for the sentence we received corresponds to our
crimes, but this man has done nothing criminal." 42 Then he said,
"Jesus, remember me when you come into your kingdom." 43 He replied to
him, "Amen, I say to you, today you will be with me in Paradise."
It is a fair reading of that interaction that it is the same kind of ruling as in Luke 7:50 - the Thief's faith (professed) grants him salvation. (saves him).
Now that Jesus has ascended, he judges the dead, not the living, and Christian practice from the earliest church includes baptism as a means of professing their faith that Jesus is the baptizeds' hope of salvation. (If there is a denomination of Christians who do not profess their faith if Jesus as a part of Baptism, I am not aware of it).
Does the narrative of the thief on the Cross mean Baptism isn't necessary?
No; Jesus no longer walks among us as a man. He now administers judgment in heaven, having left instructions (the Great Commission) for baptism of, and sharing the gospel with, the whole world.
He does something similar in Mark 5:34 and Luke 17:19: "your faith has healed you" however whether that is simply the physical healing, or a deeper spiritual healing, is arguable. (I've seen arguments both ways ... )