No. A World of Warcraft trial account cannot take an expansion key. Trial accounts are capped by design, and upgrading means converting to a full subscription and applying the expansion to that.
If you are starting out, the practical advice is to install in order. Get the base game working first, then apply The Burning Crusade, then Wrath of the Lich King, because the later expansion expects the earlier content to be present.
Be ready for the patch downloads. A fresh install of an older MMO can involve many gigabytes and hours of updating before you can log in, so start it the night before you plan to play. It is worth the wait, but not if you are sitting there watching a progress bar.