I'm looking to flash a cm based rom's boot.img on another cm based rom for my device both based on android L 5.1 with twrp 3.0 is that possible?
Boot into TWRP, select Install and follow the screenshots for the rest.
(Click image to enlarge)
It's not a problem for TWRP to which ROM your particular kernel belongs. The size should not be greater than the partition. That's all.
If the kernel is not good for the ROM, your device would not boot into the ROM or would cause some other instability, so proceed with caution.