The Wikipedia entry for Prisoner of Azkaban describes clearly the relevant plot from chapter 17.
While at his cabin, Hermione discovers Scabbers in Hagrid's milk jug.
They leave, and Buckbeak is executed. As Ron, Harry, and Hermione are
leaving Hagrid's house and reeling from the sound of the axe, the
large black dog approaches them, pounces on Ron, and drags him under
the Whomping Willow. Harry and Hermione and Crookshanks dash down
after them; oddly, Crookshanks knows the secret knob to press to still
the flailing tree. They move through an underground tunnel and arrive
at the Shrieking Shack. They find that the black dog has turned into
Sirius Black and is in a room with Ron. Harry, Ron, and Hermione
manage to disarm Black, and before Harry can kill Black, avenging his
parents' deaths, Professor Lupin enters the room and disarms him.
Harry, Ron, and Hermione are aghast as Lupin and Black exchange a
series of nods and embrace. Once the three students calm down enough
to listen, Lupin and Black explain everything. Lupin is a werewolf who
remains tame through a special steaming potion made for him by Snape.
While Lupin was a student at Hogwarts, his best friends, James Potter,
Sirius Black, and Peter Pettigrew, became Animagi (humans able to take
on animal forms) so that they could romp in the grounds with Lupin at
the full moon. They explain how Snape once followed Lupin toward his
transformation site in a practical joke set up by Sirius, and was
rescued narrowly by James Potter. At this moment, Snape reveals
himself from underneath Harry's dropped invisibility cloak, but Harry,
Ron, and Hermione disarm him, rendering him unconscious. Lupin and
Black then explain that the real murderer of Harry's parents is not
Black, but Peter Pettigrew, who has been presumed dead but really
hidden all these years disguised as Scabbers. Lupin transforms
Scabbers into Pettigrew, who squeals and hedges but ultimately
confesses, revealing himself to be Voldemort's servant, and Black to
be innocent. They all travel back to Hogwarts, but at the sight of the
full moon, Lupin, who has forgotten to take his controlling potion
(the steaming liquid), turns into a werewolf. Sirius Black responds by
turning into the large black dog in order to protect Harry, Ron, and
Hermione from Lupin. As Black returns from driving the werewolf into
the woods, a swarm of Dementors approaches, and Black is paralyzed
with fear. One of the Dementors prepares to suck the soul out of
Harry, whose patronus charm is simply not strong enough. Out of
somewhere comes a patronus that drives the Dementors away. Harry
faints.
The Cat, Rat, and Dog clearly listed in the Wikipedia article are Crookshanks, Scabbers, and Black. Unless we are to make the logical leap to assume that Crookshanks transubstantiated himself into McGonagall or some other Cat within the Shrieking Shack, it clearly answers this question.