While I cannot address the scripture, I believe as LARobert wrote, that God rarely allows the souls of deceased loved ones to visit us — if at all. On this I would add a caution. Aside from the fact that people may be influenced to believe they are in contact with deceased relatives, and can be victims of mental illness or drug addiction, or evil tricks (as pointed out above), I believe that there is also a fine line between belief and superstition.
I was raised using the term “Holy Ghost” but the term now is “Holy Spirit” because of the way the term “ghost” can be misunderstood and misinterpreted. It’s too secular and generic a term.
And though this is a bit off topic, for these reasons (that only God could allow it), I am strongly opposed to the use of psychics and those who purport to be able to contact deceased loved ones. Not only because it crosses over into superstition, but because it assumes a power that only God would have or allow. That places a belief that the psychic is greater than God’s power, which would violate a Commandment or two.