A cat is mentioned in Lily's letter to Sirius in Book 7.
Plus, in Book 3, when Hermione bought Crookshanks, the shopkeeper told her that the cat had been there a long time and no one wanted him.
It's also interesting that Crookshanks was always after Scabbers/Peter Pettigrew, even pouncing on the rat during their first encounter in the Magical Menagerie. That was well before Crookshanks started communicating and helping Sirius Black, as revealed in Chapter 19 of Prisoner of Azkaban.