There's plenty of evidence to show that Catnip is disliked by rats. It's also known to be an effective mosquito repellant.
Catnip is also known as Catmint (which is the name by which your local garden centre might know it). It's a herb which tolerates most conditions, so there's no reason why you shouldn't be able to grow it in pots (as I do).
The obvious downside of planting catnip is that you'll attract all of the local cats, who'll probably treat your garden as a toilet. Your decision to plant it will depend upon your priorities. I love rats (and put food out for them wherever I can find them). I also love cats. I hate gardening. So I've got catnip, in pots, inside my house for the benefit of the neighbours' visiting cats but I'd never plant it in the garden 'cos I love the rats!
Chris