In any other sense you'd be correct, if. (If it can't kill a ghost how could it kill a memory, but?). But remember nearly headlessNearly Headless Nick was petrified as a ghost, and Tom's memory, having gained corporeapcorporeal form, was no longer just a memory. So if the basilisk can petrify a ghost with no physical body, what do you think it would do to a memory with one.?