Can I install OS X onto a separate external drive partition?
Yes!

As the disk is the correct format, it will show in the disk list in the installer (click Show All Disks). You can install any version of OS X on a partition of the correct format, regardless of where the partition is located.

The OS X installer doesn't partition the disk for you though; do this first in Disk Utility.