Yes its possible, some devices like the HTC require a bootloader unlock, from there you can flash a custom image (a recovery in your case) and then attain a flashable root installer zip which can further be flashed via the recovery to obtain root access.
That's how I did it with my HTC Desire X a year or so back.
Sent from my Nexus 5 using Tapatalk