You are the head of your family and are duty-bound to protect them moreso than you are to protect a stranger. As Matthew said, this was a big part of the OP's scenario.
I agree, family comes first. As St Paul says, we are obligated to take care of our household first, then those of the "household of the Faith" second (i.e. Trad catholics). Strangers would be "dead" last (pun intented). ...I don't think you're obligated to put yourself in danger of death for most people (family excluded). In such a situation, you'd have to rely on your gut instinct and a quick prayer.
.
Another simpler scenario would be related to food. Supposed you're on your way to the grocery to buy some very necessary things and you don't have much money to spare (i.e. think of an inflationary, food-ration situation). On the way to the grocery (or after you bought the food) you come across a starving family. I would give them a little of money or food I had, but I could not give them all, since my family's needs come first.
.
Certainly, God has worked many miracles in such situations for saints that gave away all the food they had, and they returned home to the house/monastery empty handed. Yet, God miraculously provided them food later. Surely God can work such miracles for us too, if we had Faith, but there's also prudence to think about. I'm no saint, so I don't know if such circuмstances were meant to test the Faith of the house/monastery and if the actual saint was given the inspiration to give all he had to the strangers. In absence of such an inspiration, I would think you help them out some, but not give them all. Maybe my Faith is just lacking? Maybe I'm just looking at this too materially? It's very possible.
.
Though there was a story where the Cure of Ars gave away all the school's food and had the children pray all night for a miracle. In the morning, the food prayed for was there, but St John Marie made the comment that he would never do such a thing again, because he didn't want to tempt Divine Providence. St John worked many miracles but even he knew that there were limits. Where does one draw the line between Faith in God and human prudence? That's a difficult question.