of course the ruler can be elected (if he can run, then he can be elected). what happens after i'm not certain (because i can't remember if i've seen it before). either he gets auto booted as ruler or as lord i imagine. i would favour default to being the former... because the latter would be a bit pointless.
if it's possible for a ruler to get voted in as lord and make himself duke before autoboot kicks in, then that would be a loop hole. as it bypasses the hierarchy.
as things stand atm, just because a ruler can't make himself lord and duke after doesn't excuse placeholder. it just means they should be more careful in what elections they run in or what positions they hold before grabbing the rulership. (or figure out a way to get rid of a duke and take his place)
it's not all that different from a lord getting elected as ruler and losing lordship.
---
ps.. mechanics wise.. the "easiest" remedy would be to allow dukes to give (empty) regions to another duke and allow rulers to make themselves dukes of empty duchies. but i think that won't happen.