Yes. In fact, I would happily sacrifice the life of every single American spy abroad for a single innocent life. And you are a bad person if you wouldn’t.
And this is ignoring the fact that you are completely making up that a better warning would have “doomed them to certain death”.