Some theologians apply it but it is not the practice of the Church to do so. There is a document on the topic. From that:
During the 20th century, some theologians, developing certain more ancient theological theses, proposed to recognize for little children either some kind of Baptism of blood (by taking into consideration the suffering and death of these infants), or some kind of Baptism of desire (by invoking an “unconscious desire” for Baptism in these infants oriented toward justification, or the desire of the Church).[58] The proposals invoking some kind of Baptism of desire or Baptism of blood, however, involved certain difficulties. On the one hand, the adult's act of desire for Baptism can hardly be attributed to children. The little child is scarcely capable of supplying the fully free and responsible personal act which would constitute a substitution for sacramental Baptism; such a fully free and responsible act is rooted in a judgement of reason and cannot be properly achieved before the human person has reached a sufficient or appropriate use of reason (aetas discretionis: “age of discretion”). On the other hand, it is difficult to understand how the Church could properly “supply” for unbaptised infants. The case of sacramental Baptism, instead, is quite different because sacramental Baptism, administered to infants, obtains grace in virtue of that which is specifically proper to the sacrament as such, that is, the certain gift of regeneration by the power of Christ himself. That is why Pope Pius XII, recalling the importance of sacramental Baptism, explained in the “Allocution to Italian Midwives” in 1951: “The state of grace is absolutely necessary for salvation: without it supernatural happiness, the beatific vision of God, cannot be attained. In an adult an act of love may suffice to obtain him sanctifying grace and so supply for the lack of Baptism; to the child still unborn, or newly born, this way is not open”.[59]This gave rise among theologians to a renewed reflection on the dispositions of infants with respect to the reception of divine grace, on the possibility of an extra-sacramental configuration to Christ, and on the maternal mediation of the Church.
The entire document concludes that we have great hope that children who die without Baptism are saved because of an act on God's part alone. This would be the actual teaching on the matter:
101. “As regards children who have died without Baptism, the Church can only entrust them to the mercy of God, as she does in her funeral rites for them. Indeed, the great mercy of God who desires that all should be saved, and Jesus' tenderness toward children which caused him to say: ‘Let the children come to me, do not hinder them’ (Mk 10:14; cf.1Tim 2:4), allow us to hope that there is a way of salvation for children who have died without Baptism. All the more urgent is the Church's call not to prevent little children coming to Christ through the gift of holy Baptism”.
3.6. Hope
102. Within the hope that the Church bears for the whole of humanity and wants to proclaim afresh to the world of today, is there a hope for the salvation of infants who die without Baptism? We have carefully re-considered this complex question, with gratitude and respect for the responses that have been given through the history of the Church, but also with an awareness that it falls to us to give a coherent response for today. Reflecting within the one tradition of faith that unites the Church through the ages, and relying utterly on the guidance of the Holy Spirit whom Jesus promised would lead his followers “into all the truth” (Jn 16:13), we have sought to read the signs of the times and to interpret them in the light of the Gospel. Our conclusion is that the many factors that we have considered above give serious theological and liturgical grounds for hope that unbaptised infants who die will be saved and enjoy the Beatific Vision. We emphasise that these are reasons for prayerful hope, rather than grounds for sure knowledge. There is much that simply has not been revealed to us (cf. Jn 16:12). We live by faith and hope in the God of mercy and love who has been revealed to us in Christ, and the Spirit moves us to pray in constant thankfulness and joy (cf. 1 Thess 5:18).
103. What has been revealed to us is that the ordinary way of salvation is by the sacrament of Baptism. None of the above considerations should be taken as qualifying the necessity of Baptism or justifying delay in administering the sacrament. Rather, as we want to reaffirm in conclusion, they provide strong grounds for hope that God will save infants when we have not been able to do for them what we would have wished to do, namely, to baptize them into the faith and life of the Church.
The entire document, which is a good read...is here:
The Hope of Salvation For Infants Who Die Without Being Baptized