Owls in Harry Potter carry the mail. Do rats, cats, or toads have any specific function aside from being pets?
J.K. Rowling says on Pottermore that the animals the students bring to Hogwarts are not familiars in the proper sense of the term, but rather serve as pets (and, yes, owls handle the mail).
Familiars, in the strictest sense, do not exist within the world of Harry Potter. Although Hogwarts students are permitted to bring animals to school with them, the cats and rats we see there are, broadly speaking, pets. Ironically, the animal that acts most like a traditional familiar in the entire series is Mrs Norris, who belongs to the castle's only non-magical inhabitant, Argus Filch. It is true that owls are sent as messengers within the series, but this is in the context of a highly organised postal service, not unlike Muggle pigeon post.
Perhaps one exception to this would be Hermione's Crookshanks, who is half-Kneazle, half-cat. Kneazles are known for being able to lead their owners home no matter what, and to protect them from danger (FBAWTFT). Crookshanks was suspicious of Scabbers all year, and various antics ensued, in Prisoner of Azkaban.
So do they have any special function outside their regular animal duties? No, they don't.
As Slytherincess indicated in her answer, the pets in Harry Potter are not actual familiar, and they do not always have a particular function. But they are not mundane either. The owls and Crookshanks are not the only example: in PoA we also see magical (or at least enhanced) rats in the magical menagerie.
Then there were cats of every color, a noisy cage of ravens, a basket of funny custard-colored furballs that were humming loudly, and on the counter, a vast cage of sleek black rats that were playing some sort of skipping game using their long, bald tails.
“Hm,” said the witch, picking up Scabbers. “How old is this rat?”
“Dunno,” said Ron. “Quite old. He used to belong to my brother.”
“What powers does he have?” said the witch, examining Scabbers closely.
“An ordinary common or garden rat like this can’t be expected to live longer than three years or so,” said the witch. “Now, if you were looking for something a bit more hard-wearing, you might like one of these—”
She indicated the black rats, who promptly started skipping again. Ron muttered, “Show-offs.”
Quotes from Harry Potter and the Prisoner of Azkaban - Chapter 4 : The Leaky Cauldron (emphasis mine).
The rats don't seem really useful but they have an "entertaining" function and they seem to understand what is going on around them (last quote they start skipping again, apparently hoping to impress Ron into buying one of them).
The way the witch references Scabbers as "a common rat" and asking what powers he has and not if he has any suggests she expects an enhanced one. So that could mean that the pets of wizards are expected to be the "enhanced version". At least this menagerie only seems to sell the enhanced rats. This could be true for other animals but I don't remember any further explanation on them.
So the pets in HP might not always have another function than pet, but that doesn't mean that they are common. So if your question is about skills rather than function then yes, they do have special skills. (the rats at least)
Crookshanks, the cat Hermione brought to Hogwarts, definitely has special skills. You can find the proof in Harry Potter and the Prisoner of Azkaban chapter 19.
‘This cat isn't mad,’ said Black hoarsely. He reached out a bony hand and stroked Crookshanks's fluffy head. ‘He's the most intelligent of his kind I've ever met. He recognized Peter for what he was straight away. And when he met me, he knew I was no dog. It was a while before he trusted me. Finally, I managed to communicate to him what I was after, and he's been helping me …’
‘What do you mean?’ breathed Hermione.
‘He tried to bring Peter to me, but couldn't …so he stole the passwords into Gryffindor Tower for me … As I understand it, he took them from a boy's bedside table …’