If one is in extreme necessity, he has the right to procure for himself what he needs out of the riches of others. (69)

To be sure, GS goes on to give a (rather weak) defense of private property:

Private property or some ownership of external goods confers on everyone a sphere wholly necessary for the autonomy of the person and the family, and it should be regarded as an extension of human freedom. Lastly, since it adds incentives for carrying on one's function and charge, it constitutes one of the conditions for civil liberties. (71)

But surely it stretches the Catholic “both and” to the breaking point to simultaneously defend private property and seemingly endorse theft.

Perhaps we should read the former statement not as an endorsement of theft, but as a recognition of the necessity defense. As one legal scholar observes of the defense of necessity in American law:

The applicability of the necessity defense depends entirely on the nature of the offense committed and the circumstances that occasioned its commission. One who committed trespass or theft because she otherwise would have suffered the effects of hunger or exposure can argue, at least in theory, that her conduct was justified under the defense of necessity. By contrast, one who committed rape or murder or assault as a result of her impoverishment would almost invariably be unable to establish a defense of necessity, because her action (1) would not be effective in abating the danger she sought to avoid, and (2) even if it was (say, if she killed V to get the loaf of bread he was holding), the harm caused by the criminal act would be no less serious than that sought to be avoided.

In practice, even a starving or homeless person charged with theft or trespass will have a hard time establishing a necessity defense if the prosecution can show that: (1) she would not have suffered any serious injury if she had not committed the crime; (2) there were legal alternatives available to her, such as attending a soup kitchen or homeless shelter; or (3) she somehow bore responsibility for the impoverished situation in which she found herself. Presumably as a result of these stringent requirements, reported cases in which a defendant charged with theft or trespass was acquitted by virtue of the necessity defense are virtually nonexistent, at least in modern times.

Allowing a defense of necessity creates a risk that people may act precipitately, before the necessity is genuine. Thus if the law allows a starving mountaineer to break into a remote cabin as a last resort to obtain food--if, in other words, necessity is a defense to a charge of theft--it creates a risk that wanderers will break doors whenever they become hungry, even though starvation is far in the future.[2]

That risk is “addressed by the rule that the evil must be imminent and the means, well, necessary; the departure from the legal norm must be (as with self-defense) the very least that will avert the evil.”

I assume that the point the authors of GS were trying to make is that necessity can be seen as a moral justification for something—theft—that would otherwise be wrongful. As the Catechism explains:

The seventh commandment forbids theft, that is, usurping another's property against the reasonable will of the owner. There is no theft if consent can be presumed or if refusal is contrary to reason and the universal destination of goods. This is the case in obvious and urgent necessity when the only way to provide for immediate, essential needs (food, shelter, clothing ...) is to put at one's disposal and use the property of others. (2408)

In other words, extreme necessity wholly justifies taking another’s property to such an extent that the taking is no longer theft.