If I have a 10-day free trial of Wrath of the Lich King, can I buy Cataclysm and install it too?
If you use the 10 day free trial for Wrath of the Lich King, you can then go on to also install the 10 day free trial of Cataclysm. However, you will not be able to associate a Cataclysm game with your account if you do not already have a Wrath of the Lich King game on your battle.net account.
The WotLK 10-day trial is not enough -- you must buy the full game in order to then go on and own Cataclysm.
You're certainly able to buy Cataclysm regardless of whatever else you own. The question of associating/installing is a different matter.
Cataclysm content is split into two parts: the old world revamp and the new endgame content. The old world revamp contains updated zones and quests in the Kalimdor and Eastern Kingdom continents between levels 1 and 60, as well as significantly revamped class mechanics; all of this content is included in the game for all players. The new endgame content (plus the new worgen and goblin playable races) are only available to players who are able to associate the full Cataclysm expansion with their account, which (as Raven Dreamer says above) can only be done by owning and associating Wrath of the Lich King.
You may be able to play the game for free up to level 20 as goblins or worgen (or any other race) even without a subscription after you've purchased and associated both expansion packs, however.