Which direction does it open? Towards the outside or going inside? If its going inside, a rat can easily slip thru. Or if it opens to the outside but is not closing properly, a rat can open it (intelligent they are), and go inside as well.
Always lock those screen doors.
Rats can dive and swim, so it may be possible that they found a way into your house thru the toilet bowl. But I doubt that.