good idea, but I think theres an easier way-
get an adapter with the appropriate fittings- -NPT, JIC, SAE, whatever-- with the proper hole for your sensor that will fit inline with the hoses going to the filter. Unattach your choice of line, install adapter, install sensor, and reattach oil line.
MUCH easier than drilling a hole in the filter. Less concerns of leaking, too. That said-- if there's a flat surface on the filter housing with no ubstructions befind it, I don't see why you couldn't do it. But you'll lose any warranty the unit came with.