It's possible, but it's inconsistent. If you die of old age and are Canonized, (event 1000) it checks that you are not Sceptical, Heretic or Excommunicated. While dying of illness and getting Canonized (event 1001) does not check that.
There may be a logical reason for this, but to me it seems inconsistent.