'Dwarves!' said Bilbo in pretended surprise.
'Don't talk to me!' said Smaug. 'I know the smell (and taste) of dwarf -- no one better. Don't tell me that I can eat a dwarf-ridden pony and not know it! You'll come to a bad end, if you go with such friends, Thief Barrel-rider.'(Annotated Hobbit 281)
The most obvious interpretation of 'dwarf-ridden pony' in this, or perhaps even most contexts, is 'ridden by a dwarf'.
But that's not the only possibility, and in a conversation so full of riddling and wordplay as that of Bilbo and Smaug we might want to consider the following.
From Old English bӕddryda, or bedreda, comes the modern 'bedridden.' From 'bedridden' by analogy descend various words, e.g., 'bird-ridden' (1835), 'bug-ridden' (1848), 'bureaucracy-ridden' (1861), 'capitalist-ridden' (1844), 'caste-ridden' (1840), 'chair-ridden' (1885), 'chamber-ridden' (1856), 'child-ridden' (1843), 'class-ridden' (1842), 'conscience-ridden' (1617), 'crime-ridden' (1801), 'devil-ridden' (1707), and, not to belabor the point 'dragon-ridden' (1922) 'pixie-ridden' (1893), and even 'Nazi-ridden' (1942). A search in the OED for *ridden reveals these and over a hundred other such formations from the beginning of the alphabet to the end, only a few of which -- such as 'overridden' the past participle of 'override' -- have other than a decidedly negative connotation. The noun modified by the *ridden adjective is oppressed, beset, infested, or otherwise disabled by the first part of the compound.
From Smaug's perspective, then, ponies ridden by dwarves are also infested by dwarves, vermin-ridden, as it were. The dragon's wordplay in this sentence is followed up in the next, as he promises Bilbo, who came from 'the end of a bag', that with friends like dwarves he will come to a bad end. The tongue of the worm doesn't miss a turn, any more than the pen of Tolkien does.
Note: I would like to thank my friends, Shawn Marchese and Alan Sisto, of The Prancing Pony Podcast, since it was while listening to their reading of this passage on my way to work this morning that the other interpretation of 'dwarf-ridden' occurred to me.