Rats can easily get in through your doggy door. However, they can also get access by climbing onto your roof and chewing through to the attic. Some rats have even been known to nibble through walls to get inside.
So, if a rat wants to get in, it will find a way regardless of whether you have a pet door or not.