In the film Gordy the head of a major corporation hands over control to the title character, a small pig, upon his death.
A rare case of such a character being the main protagonist, the film Baileys Billions had the titular character, a dog named Bailey, inheriting $1 billion from a deceased relative, causing the woman's nephew and his wife to try to kidnap the dog to gain the inheritance.
Similarly, the movie The Aristocats had a Paris woman deciding to allow the Cats to inherit her estate, with her butler intending to off the cats before she dies so he could acquire the inheritance.
A past Patrician of Ankh-Morpork (the aptly named 'Mad Lord Snapcase', though most Patricians had names like that) appointed his horse as a city councilor, though it is pointed out that it wasn't a bad councilor compared to some of the others, which included: a vase, a heap of sand, and three people who had been beheaded.
In Making Money, when Topsy Lavish dies, she leaves 50% of the shares in the bank to her dog, Mr Fusspot (who already owns 1% of the bank, giving him a majority and making him chairman). She then left the dog to Moist von Lipwig, forcing him to take control of the bank, which was her plan all along.
The Discworld Companion states that the Sto Plains village of Scrote has elected a dead body as its Mayor for several decades. The first time it was because the candidate died in mid-election (but was still more popular than the alternative); after that, the villagers really liked how the late Mayor hadn't raised taxes or embezzled town funds.
There is also the (in-universe) historical example of St Ossory's ass (his donkey, not his behind) which was made a bishop in the Omnian church.
Lord Midnight in the backstory of the Vorkosigan Saga, a horse who gets appointed heir by a Count as part of a feud between the Count and his son. The funniest thing about Lord Midnight is that he's important. When his appointment was legally challenged, it was upheld— thus establishing the precedent that a Count's designated heir need not be his own descendant, or even human. This becomes important when cloning and genetic engineering technology starts to blur the traditional definitions of what makes someone a descendant, or a person.
Midnight fortunately/sadly predeceased the Count, who designated his now reconciled son as heir once again.
One Andermani Emperor tried to do this for his potted plants in the backstory of the Honor Harrington novels. He was quietly deposed.
In Malcolm in the Middle, when the scandals at Hal's company finally come to light one of the many revelations is that the company president had his dog on the board of directors. Hal himself is disturbed that he had cc'd the dog on several memos.
On 30 Rock, Don Geiss stacks the board of directors with "the most reliable collection of sycophantic yes-men this side of an Al Franken book signing: His golf cronies, his army buddies, a collection of unemployable family members and his hunting dogs." It's unclear how intelligent the dogs are, but they're apparently capable of staying seated at the table and voting in some fashion.
Referenced in The Suite Life on Deck, when Bailey explains her idea of a "big city:" "Any place where the mayor isn't a goose."
In one episode of The Fresh Prince of Bel-Air, there is a rather loopy corporate executive who took investment advice from his dog (There was mention of him investing in General Motors because the dog chased a Buick). By the time of the episode, Sparky the dog had been dead for months - but his owner had him stuffed and mounted in his office and still took investment advice from it.
The president of the Henchmen Guild in Nodwick is a hamster.
Of course, the hamster only got appointed to membership in the Guild by its owner, the previous president. It was elected president at the next election due to all people present and voting being drunk. The hamster's reelection (for life) was due to the guild steward being bribed.
King Steve of 8-Bit Theater has a coffee stain named Rodney as his right hand man. He also briefly lost his kingship to a length of string.
In The Simpsons, the nuclear plant is actually owned by a canary, so that if the government ever conducts a proper investigation, the canary is the one that will go to jail. Mr. Burns implies that this is standard practice. In another episode, he made a dog a vice president.
In another episode, an inanimate carbon rod from the nuclear reactor was honored as Employee of the Month (much to Homer's chagrin), and after Homer used a different Inanimate Carbon Rod to lock the door on the spacecraft after it was destroyed, it was given its own ticker-tape parade.
In fact, in the aforementioned episode with the canary, Homer is shown at the very bottom of the nuclear plant's employee hierarchy via a chart (the canary being at top, with Burns directly below him). Directly above Homer is the Inanimate Carbon Rod.
Its also implied that hiring animals to even work at the plant, never mind making them high officials, was one of Mr. Burns' quirks, as in the episode "The Last Temptation of Homer Simpson", it was shown that he had, aside from hiring an illegal Iranian immigrant worker, also had hired a duck named "Stewart" as a low level employee who tows nuclear waste.
Real Life
Trope Namer: Emperor Caligula famously planned to appoint his favourite horse Incitatus to the consulship, the highest office in Rome. However, it's a little more complicated than it sounds. He may have done this in order to mock the senate. It may have been a rumor started after his death. Or he genuinely might have been completely insane, which was the firm position of most ancient writers.
Real Life examples happen all the time (especially in small towns in the United States) with towns electing animals, and in one unconfirmed case of a statue, as mayors for their cities.
Although not officially, one of the things that the seventies era Feminist movement did was crown a live sheep Miss America on a boardwalk of Atlantic City in 1968.
The Ohio State University once elected a cow as homecoming queen.
A town in the mid Turn of the Millennium saw a ficus tree elected as mayor. The only reason he/she/it/His Leafieness didn't hold the title was because it was ruled that only humans could be candidates.