In any other sense you'd be correct, if it can't kill a ghost how could it kill a memory, but remember nearly headless Nick was petrified as a ghost, and Tom's memory having gained corporeap 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.