Yes, this.
From Canon Law 1917
595. An adult should not be baptized except with his own knowledge and will, and after due instruction. He is, moreover, to be admonished to repent of his sins. In danger of death, if he cannot be thoroughly instructed in the principal mysteries of faith, it is sufficient for the conferring of Baptism that he show in some way his assent to these points of faith, and earnestly promises that he will keep the Commandments of the Christian religion.
If he cannot even ask for Baptism, but has either before, or in his present condition manifested in some probable manner an intention of receiving Baptism, he may be baptized conditionally. If afterwards he gets well, and there remains doubt as to the validity of the Baptism, he may be baptized again conditionally. (Canon 752.)
Yes, this is what I meant when I said that Baptism is licit so long as there is SOME indication that he assents to the Catholic faith, and CLEARLY a stated desire "to become Catholic" counts. No, you can't just randomly administer Baptism to someone who showed NO indication of wanting to become a Catholic. But this clearly counts. This was reiterated to me by a priest who was educated before Vatican II, who said that there must be SOME indication that the person wishes to enter the Church and become a Catholic. There is ZERO requirement that this come directly from the dying person. In fact, this priest refused to Baptize a dying person after interviewing a relative who requested it. He asked her, "Did he give ANY indication whatsoever of having interest in becoming a Catholic?" This person was unconscious at the time and ready to pass away. When the relative answered, no, he regretted that he could not baptize him. But he told me that there needed to be SOMEthing, i.e. the "show in some way" part in Canon Law.
I believe that the conditional formula is "IF YOU WISH TO BE BAPTIZED," ... this way, if he doesn't, then there's no harm done to the Sacrament. And the bar is extremely low for justifying a CONDITIONAL Baptism.