A flag is neither a safety concern nor an eyesore.
Perhaps not to you and me, but to someone else, it very well might be. But even if it's none of those things, a landlord can still decide that he does not want flags hung from balcony railings.
Since real property isn't soverign and continues to be subject to US law, a private contract cannot impinge upon an individual's rights under law.
Ooh, another guy that fancies himself a lawyer. First of all, there is no "right" to hang the flag from your balcony railing. Second of all, all sorts of restrictions to what a tenant can do can and are imposed all the time. Leases, for example, often mention that a tenant cannot have pets in the apartment.
An owner can do as he pleases (provided he doesn't harm others) on his own property. If he decides to lease a portion of the property to others, in so doing he accepts that other parties arrive with rights which he cannot curtail with private contract.
People
can and often
do waive many of their rights. For example, when you lease an apartment, the landlord typically loses the right to enter the premises at any time and without the permission of the owner. This is sensible because the landlord surrenders possession of the premises to the tenant for the term of the lease
However, a lease will typically grant the landlord right of entry anyways.
You can argue that the tenant has a First Amendment right to fly the flag - I would agree with you. However, if his lease explicitly regulates what can and cannot be hung/displayed from balconies (and most leases do), then the tenant doesn't have a leg to stand on.