After graduating from Rutgers University in 2011, Mitch Leff, a New Jersey native, moved into a Chinatown walk-up with a friend, then rented a studio on the Upper East Side. From there, he decided to try a trendier location downtown, so he rented a studio in a Financial District condominium, and lived there happily for two years.

“It was perfect,” he said. “There was a Dunkin’ Donuts in my building.”

Mr. Leff would see dogs come and go, dimly aware that owners — but not renters — were allowed to have them in the building. So he adopted Mazel, a miniature goldendoodle.

“I felt the pressure of being 30 and single, and I wanted companionship,” he said. “I was doing a little soul-searching in my life. I brought home a Jewish woman, but she has four legs.”

But as soon as Mr. Leff dropped off his 9-week-old puppy at his apartment and left to return the Zipcar, the doorman called. Mazel was barking; neighbors were complaining. He learned that he was not allowed to have a dog.