Probabley not directly, as I think the scanClass is set by the ship's entry in Shipdata, but this workaround might do it:-
Have the AI switch to an Explode state (copied from missileAI).
Have as a deathaction a spawn : shipclone.
Define the clone in shipdata as a likeship to the orginal, but with ScanClass THARGOID.
They'd be a flash and the ship appears to switch its scanClass to Thargoid.
OXPS : The Assassins Guild, Asteroid Storm, The Bank of the Black Monks, Random Hits, The Galactic Almanac, Renegade Pirates can be downloaded from the Elite Wiki here.
Hang on: Only problem would be that if the player killed the ship a thargoid scanClass clone would appear (which might not be what you want). But if the switch to Explode was done under Energy Low, then it would be OK as the player coudn't kill the ship without triggering the switch (unless hit with an e-bomb or a missile). Hmm, probabley not an ideal solution on reflection!
OXPS : The Assassins Guild, Asteroid Storm, The Bank of the Black Monks, Random Hits, The Galactic Almanac, Renegade Pirates can be downloaded from the Elite Wiki here.