Upgrade to Mavericks from an external HDD
Yes this is entirely possible. Download Mavericks from the Mac App Store and in the install process select your internal disk as the destination for the install.