We had our cat in our apartment, it was allowed by the management company. It was not great for her because she was bored witless roaming 400 sq ft, she made great work of the scratching post though! A cat that had always lived in an apartment would probably be happier. The other consideration is the kitty litter and where it's going to go. If you are prepared to put in the time a small dog might actually be a better choice because you can walk it, a cat tends to just gets nervous if you bring it out the courtyard. If you do get a dog get something that's easily amused not too much grey matter to get bored and start chewing your furniture, something like a king charles would probably be happy enough.