In the case of a private landlord I would generally agree with you: the two parties are free to negotiate the terms of the lease and the tenant can go elsewhere to lease an apartment.
With a public housing authority (PHA)lease it becomes far more complicated. It involves matters such as who owns the PHA (Is it apart of a city /county government?), how the provision in the lease came about and how it effects the tenant in these particular circumstances.
"Whereas private landlord-tenant agreements provide freedom of contract and an opportunity for the parties to bargain,the lease between a public housing tenant and a PHA more closely mimics a contract of adhesion, where there is no opportunity to bargain terms."
https://scholarship.law.stjohns.edu/cgi/viewcontent.cgi?referer=https://duckduckgo.com/&httpsredir=1&article=1030&context=lawreview
It could be catastrophic for this sick woman caring for a sick child to lose her PHA lease. Her specific circumstances may enter into the limited scope decision.
The court could also find the weapons ban to be an unconstitutional provision.i.e. if it is the exchange of an enumerated right for a government benefit it could be found unconstitutional. But courts tend to shy away from constitutional grounds and look for a simple explanation under contract law or public safety terms.
It should be interesting to see how it comes out in light of Heller and McDonald.
If someone wants to argue that the public ownership of a housing project somehow conveys rights to its occupants that they otherwise wouldn't have, then these housing projects should be treated no differently than a park or public street. Nobody should be allowed to lock their doors, and the public should be able to enter the apartments whenever they feel like it.