To answer with a kantian perspective (surprise, surprise!):
In the realm of ends everything has either a price or a dignity.
What
has a price is such that something else can also be put in its place as its
equivalent; by contrast, that which is elevated above all price, and admits of
no equivalent, has a dignity. (Groundwork for the Metaphysics of Morals, Ak. 4:434, Cambridge Edition p. 52)
This could mean that the last of a species, as nothing could be placed as its equivalent, would have dignity, whereas one child under millions does not. But oh! on the contrary!
That which refers to universal human inclinations and needs has a market price; that which, even without presupposing any need, is in accord with
a certain taste, i.e., a satisfaction in the mere purposeless play of the powers ||
of our mind, an affective price; but that which constitutes the condition
under which alone something can be an end in itself does not have merely a
relative worth, i.e., a price, but rather an inner worth, i.e., dignity.
Now morality is the condition under which alone a rational being can be
an end in itself, because only through morality is it possible to be a legislative member in the realm of ends. Thus morality and humanity, insofar as it
is capable of morality, is that alone which has dignity. (Groundwork for the Metaphysics of Morals, Ak. 4:434-5, Cambridge Edition p. 52-53)
That means that only rational (perhaps more modern sentient) beings have a dignity, and their worth is "above all price". The moral descision would therefore always be to rescue the human being, no matter the cost.