Sounds like a squirt of expanding foam should do the trick, but if they have dogs on their balcony it'd be best to involve them as I don't suppose it's dog friendly to eat, especially if they get into the stuff when its still wet.
Or just talk to the landlord and tell them you have dog wee...