Hi Raggie,
Having a pet as a friend and companion can be very important and rewarding. It is also good to make friends with your neighbors. If you have to hide a pet and this makes it more difficult to socialize with your neighbors, then I think it's not the best idea, especially if you already have a hard time meeting new people. Your pet could become an excuse not to get to know the people who live close by.
How about asking your homeowner's association to make an exception in the rule for you. Most people recognize the importance of pets, especially for people who live alone. I think that since some of your neighbors have pets already under the old rules, it would be likely that they make an exception in your case. Especially since you are considering a small indoor pet like a rat and not a large one that might bark or bite the neighborhood kids.
These exceptions to the rule happen all the time, but you need to take the initiative to ask. Then if alls o.k., you can have your pet and this could even help you get to know your neighbors since you could invite them over to meet your new friend. Best of all worlds. I hope it works out for you one way or another.
Greg