In Shulchan Aruch, siman 329, we find the mitzva to desecrate the Sabbath for the sake of saving lives, applies when the Gentiles come to take wheat stalks or straw from a city which is located in an area where it is easy from there, to conquer the land; this is a point of law directed towards every individual citizen and not just, specifically for the government.
And this ruling is taught if Eruvin page 45.
Now in Eruvin we learn that David [according to the Netziv in Meromei Sadeh ] who was not yet a king, rather an individual citizen, had a mitzva to desecrate the Sabbath for the sake of saving lives by the mere fact that he would save the wheat stalks and straw of Ke’ilah [ a border city ]; and he did not have an exemption from the fact that there was already an army and a government in Israel at that time [ the kingdom of Shaul {Saul} ]. That is to say, the fact that the army and the kingdom are present is not a reason to exempt the individual from saving from the Gentiles when they come to take wheat stalks and straw from the border city. And how much more so, there is no reason to exempt an individual when the Gentiles come at the outset with the intention to kill and conquer.
And so it is implied to me from the Tur, O.C., siman 329, that the mitzva is upon every man and not just upon the government and this is a translated quote: "And in a city that is close to the border, even if they have only come on account of money, we desecrate Sabbath because of them, and so too on account of a ship that is in danger of sinking in the sea or on account of a powerful river flooding, it is a mitzva for every person to save them and desecrate [Sabbath] on their behalf".