Sure it works but you have to create, clone/TM-restore and erase various volumes:
I assume your internal disk is disk0 containing disks0s2 as your internal start volume and your external disk is disk1 with disk1s2 as your Time Machine volume.
Without loosing your TM Backup:
This only works if the sum of used space on your TM-volume and used space on your main volume is smaller than ~ 500 GB (to leave some recommended free space on the interim main volume disk1s3). In your scenario the sum is ~449 GB so it works.
- Add a partition (disk1s3) on the 512 GB SSD with the size ~256 GB (by splitting disk1s2). That should work without erasing disk1s2
- Clone disk0s2 (your current main volume) to disk1s3 (or restore your TM-backup on disk1s2 to disk1s3), then restart from disk1s3
- Erase disk0s2 and clone disk1s2 to disk0s2 (or backup disk1s3 to your now new TM-volume disk0s2), then erase disk1s2
- Clone disk1s3 to disk1s2 and restart from disk1s2
- Delete disk1s3 and expand disk1s2 to the full size. If that doesn't work start from disk0s1 (your internal Recovery HD) or to Internet Recovery mode and try again.
- Just reinstall your current system on disk1s2 to create a Recovery HD if none is existing without loosing any (personal) data (e.g if you are running 10.0.2 now just download the latest Yosemite installer and reinstall).
- Swap the drives
Loosing your TM Backup (not recommended):
- Erase disk1s2
- Clone disk0s2 to disk1s2 and restart from disk1s2
- Just reinstall your current system on disk1s2 to create a Recovery HD if none is existing without loosing any (personal) data.
- Swap the drives