Pet characters in most works are Nearly Normal Animals, whether with the ability to talk in Animal Talk or not. These animals, however, are just animals, not intelligent beings like humans.
This trope, on the other hand, is about pets who are intelligent and able to interact with their owners (usually a human, but can be a human-surrogate animal or alien) on the same level. Sometimes these pets are actually smarter than their owners and choosing to hide it, other times they are open about being sapient beings and are accepted as part of the human world as well as their own world.
Pets that shift between humanoid and "pet" forms do not go here and should be under Anthropomorphic Zig Zag instead.
There are several variations on this
Sapient Pets That Masquerade as Normal Pets Around All Humans: These beings choose to hide that they are at least as smart a human. Sometimes this involves a disguise as a normal animal, other times the entire species plays dumb to stay hidden. The examples including Broken Masquerades would belong here, as a broken masquerade would suggest that there is a masquerade. Unlike the other variants, it doesn't involve animals being treated as pets and people simultaneously.
Sapient Pets That Masquerade as Normal Pets Around Some Humans: Unlike the above variant, these beings can behave like humans around some humans but not around others. Unlike the above variation, they are treated like either like people if only those who know are around or as pets by if humans who should not know they are sapient are around. They do not shapeshift to do this, they simply modify their behavior. Shapeshifters that turn from humanoids into pets and back in order to hide go under Anthropomorphic Zig Zag, not here.
Openly Sapient Pets: These are intelligent beings that don't hide that they are intelligent. Some of these beings are treated like non-sapient animals despite their sapience, and others are treated as the sapient beings they are. They may be accepted by humans around them or humans may react in horror. Either way, these beings are not afraid to "be themselves".
In Silver AgeSupergirl comics, her horse Comet, who is really a humanoid who is in love with her but has been transformed into a horse. When a comet passes the earth he becomes a human for a short period of time.
Also Krypto the Superdog for Superboy. A doglike creature from the planet Krypton, he "spoke" through thought balloons much like Snoopy.
In the film Barnyard, and early episodes of its spin off series Back at the Barnyard, the farm animals all act like dumb, domesticated animals unless they're wearing disguises when humans are around, but stand on two legs and throw parties when humans aren't around.
In the Star Wars RPG Sourcebook, "Cracken's Rebel Operatives", Moff Jarnek's Cool Pet Daerlar is a Covallon. Because Covallon walk on all fours, it isn't widely known that they're a fully sentient race. Dearlar chooses to keep this fact secret rather than seeking his freedom because he is a spy working for Cracken, and his position is the perfect "cover".
The Wonder Pets are ordinary classroom pets, until school ends, and they put on capes, fly in a flying ship and rescue baby animals.
South Park has Lemmiwinks, the adventuring gerbil. Although he never speaks he is intelligent enough to use tools such as weapons and solve problems no gerbil would be able to solve while humans aren't around. Around humans he's just a gerbil.
Futurama Has Nibbler the Niblonian, part of an ancient race of geniuses who pretend to be stupid in order to protect and monitor "lesser races" like humans. Any time the masquerade breaks, they simply erase the memory of all who saw the break.
Fat Cat in the pilot episode of Chipand Dale Rescue Rangers, and only in the pilot. After his owner Klordane is arrested, he becomes anthropomorphic completely.
Sapient Pets That Masquerade as Normal Pets Around Some Humans:
Anime and Manga
Tenchi Muyo! has Rio-Ohki, the cabbit. Around her caretakers she is as smart as a human child. Around everyone else, though, she's a pet.
In Zero no Tsukaima, magic school students are required to summon a familiar as part of their second year final exam, and the familair summoned is considered a pet, regardless of what ends up being summoned. The students themselves have no idea what will happen as the spell chooses their familiar for them.
Tabitha summons a large rhyme dragon she names Sylphid. We find out just how sentient Sylphid is when it's revealed that rhyme dragons are shapeshifters and Tabitha's "sister" Illococoo is really Sylphid's human form.
Louise summons Seito, a young man from the modern world. Though Seito is treated by everone else as a human (to the point that he is later knighted and thus legally a noble in wizard society despite being a muggle), Louise still treats him as a pet.
It turns out that "void mages" can only summon humanoid familiars, so by definition the familiar of a void mage is always a sentient pet.
Luna and Artemis from Sailor Moon can talk and have powers, but only do so to the Sailor Scouts.
Jiji the cat from Kiki's Delivery Service. Kiki, being a witch, is the only one who can understand him. She loses this ability once she loses her powers.
For a brief time, Shamisen in The Melancholy of Haruhi Suzumiya, before Haruhi's powers returned him to normal. (Presumably.) While sentient, he avoided speaking in Haruhi's presence.
Salem Saberhagen from Sabrina the Teenage Witch is a warlock transformed into a black cat as a punishment for trying to take over the world. Around other witches and warlocks he is (mostly) treated as a person but around Muggles he acts like a normal pet cat owned by Sabrina. The premise is the same in the live action TV show.
It was also adapted into an animated television series, in which not only was Salem a talking cat, he would also occasionally stand upright and wear clothing, but typically only when not around Muggles.
Series/Mister Ed pretends to be a normal horse, and only talks to directly Wilbur. He sometimes talks to other people but only when they can't see that he's a horse, such as when he makes operator assisted telephone calls, or sings when Wilbur is lip syncing, or insults a police officer when his back is turned.
Perry the Platypus from Phineas and Ferb shows Funny Animal traits, wears a fedora, and goes by the moniker, Agent P around Doofenshmirtz and other humans, but masquerades a "normal" pet who lays around the house doing nothing around Phineas, Ferb, Candace, and their friends and family.
Unlike in Barnyard and early episodes of Back at the Barnyard, the later episodes of the same show has the animals' Masquerade grow more lenient to the point that their status leans toward the Openly Sapient Pet varaint.
The entire premise of Teacher's Pet. Spot is an ordinary housedog, but puts on clothes and goes to school posing as a boy.
Every pet can talk and do human things, but typically keep this a secret from their human owners, with the exception of Spot and Leonard's other pets who basically let their human owner in on the secret.
Michigan J. Frog from the Looney Tunes cartoon, "One Froggy Evening," sings and dances when his owner is around, but just acts like a normal frog when any other human is around.
Kat from Kid VS Kat is a hyperintelligent cat-like alien. He can't speak in the conventional sense, but he is very anthropomorphized in his actions. However, around everyone except Coop, Dennis and later Fiona, he seems like just an ordinary house cat.
Fuu the dog from American Dragon Jake Long. As a magical animal, he is usually is forced to act like a normal dog around humans in the mundane world. However, other than Jake who happens to be a human/dragon hybrid, Fuu is able to socialize around Jake's friends, Trixie and Spud, who are aware of the existence of the magical world.
Dukey from Johnny Test is always a straight dog around Johnny's parents so his sisters don't get in trouble. The Men in Black, Mr Black and Mr White, as well as their boss the General, know he's a talking dog. When he's out where other people will see him, he's usually wearing a shirt saying 'Not A Dog', and described as 'the kid with the hair disorder'.
Openly Sapient Pets:
Anime and Manga
Outlaw Star has Melfina the android. She starts out as more of a crew pet and accessory and slowly grows into a regular part of the crew.
In the Star Wars book The Approaching Storm, a Gwurran named Tooqi actually asks to become Barriss Offee's pet. His logic is that pets get free food, protection from predators and the affection of their masters, in exchange for a relatively minor amount of work. Certainly a better deal than living wild in a cave with the rest of his tribe.
In Dwarf Fortress it's trivial to do a Game Mod to turn any sentient species into one which can also be a pet, just by adding the [PET] tag to the right place in the right plain-text file. Of course, since the game designer never intended sentient species to be pets, this can lead to strange results, like a sentient pet being elected mayor.
The comic Housepets! is about a group of Funny Animal housepets who act more like children to their human families rather than pets.
Keidran from TwoKinds, by some of the nicer humans (of course, they're also seen as a source of cheap labour by more dickish humans). The Keidran are officially slaves.
Frequent in Homestuck. Both Jade Harley and Jane Crocker have godlike First Guardians as pets, which clearly display malign but ultimately protective sapience. Both Terezi and Tavros have clearly sapient lusii; Tavros even plays bizarre alien card games with his.
In Drowtales, there is a race of cat people with the approximate size and intelligence level as children. Normally, they're kept as slaves, but Ariel's is more like a pet. Also, humans are considered animals by drow, and one has been referred to as a pet.
Peanuts: While Snoopy doesn't talk, the entire cast knows that he is sapient. For instance, he is somehow able to communicate to Charlie Brown that he is pretending to be the World War I flying ace. He has even acted as an attorney for Peppermint Patty (unsuccessfully, but still impressive for a dog.)
Sylvester, Tweety, and Hector from Looney Tunes are openly sapient around humans (including Granny) even though they are treated like pets.
Quite a few pets from Looney Tunes are like this too, including the cat and mouse in "Pizzicato Pussycat" and Marc Anthony the bulldog.
The titular cat and mouse duo of Tom and Jerry is this toward people, despite their lack of ability to talk.
In "Wags to Riches" and its remake "Millionaire Droopy," Spike the Bulldog (no, not the Tom and Jerry one) and Droopy the Bassett Hound are portrayed as this.
James H Schmitz short story "Novice". Telzey Amberdon's pet crest cat Tick-Tock changes from a "Masquerades as a Normal Pet Around All Humans" (including Telzey) to "Masquerades as a Normal Pet Around Some Humans" during the course of the story, as her sapience (and those of the other crest cats) is revealed to Telzey and several few high-placed human officials.
Dragon cub Spike is sort of like an adopted son or little brother to Twilight Sparkle, but in some ways he is much like a pet; Twilight Sparkle's friends know him, he very much enjoys the attention he gets from them, and like a loyal dog he often works for them and tries to protect them, and he can be very dangerous when his behaviour gets out of control. Yet Spike also talks, and has some ideas that, had they been listened to, the ponies could have avoided a lot of trouble.
Angel Bunny doesn't talk, but clearly understands what Fluttershy is saying to him, and often tries to communicate his response in non-verbal ways.
This example has a lot of Furry Confusion going for it. Some of the non-pony animals, like sheep, are shown to be able to talk but for whatever reason, are treated like animals. The pets of the ponies, (like Angel Bunny, Opal for Rarity, and Owlicious for Twilight Sparkle) act more like their real life counterparts (except Angel, as stated, often pantomimes his wishes). It's hard to say what is and isn't sentient in that universe, considering Rule of Funny comes into play so often.
Gromit the dog from Wallace & Gromit wavers between Openly Sapient Pet and Sapient Pets That Masquerade as Normal Pets Around Some Humans.