Where to start to achieve this effect?

RyanB’s approach is what I’d do, too – use a special material for the ghost, feed the flashlight parameters into the material, calculate visibility there.