Whether one calls a person a witch, a spirit medium, or some other term, clearly the Bible condemns talking with the dead. (Deuteronomy 18:10-12)
"Let there not be found within your midst one who passes his son or daughter through fire, nor a kosem kosamim
, a me'onen
, a menachesh
, or a mechashef
, or a chover chiber,
a sho'el ov v'yid'oni
, or a doresh 'al ha-metim
. Any who do thusly are an abhorrence before YHVH, and because of this abhorrence, YHVH your God will drive them out before you: you must be pure, like YHVH your God."
First of all, it is important to understand that "passing his son or daughter through fire" is a reference to the worship of Molech, a particularly repulsive pagan god sometimes worshipped in that area, whose followers practiced child sacrifice. Thus, we understand that all the prohibitions that follow are contexted by idolatry: the magics described are absolutely forbidden when done in the service of prohibited worship of other gods. It is far less clear to what degree they are permissible if not done in the service of prohibited worship.
Second of all, as I noted before, the terms employed are not general, they are exceedingly specific.
The rough, though more precise than the usual English, translations for the words mechashef/ah, kosem, me'onen, menachesh, chover chiver, sho'el ov v'yidoni,
and doresh al hametim
"hemomancer": which is to say, someone who casts spells or divines by means of blood magics
"diviner (by sorting methods)": which includes extispicy (divining by examining the entrails of an animal), cartomancy (divining by cards, like Tarot would be, today), silexomancy (divining by stones), stipomancy (divining by staves or sticks), and other kinds of methods for divination,
"nubilomancer": which is to say, someone who divines by examining the patterns of clouds,
"colubromancer": which is to say, someone who divines by examining the movements or tracks of snakes,
"caster of binding spells": which is to say, someone who casts spells in order to bind the will of the subject to the mastery of the caster,
"hucksters": which is to say, those who call themselves sorcerers or wizards or whatnot, but are only using tricks and chemical or hypnotic means of fooling the gullible into believing they are experiencing magic, for their own nefarious purposes,
and finally, "necromancers": which is to say, people who use magic to summon and desecrate the dead, either in body or in spirit.
Leaving aside, for the moment, the question of whether it might be permissible to summon the dead for reasons not relating to prohibited worship of other gods, clearly, summoning the dead was a legitimate concern, which was addressed in these commandments.
Why would such a commandment be given if there was no real expectation that, when summoned, the spirits of the dead would actually be compelled to appear?
In any case, it is the summoning that is prohibited-- not the act of speaking with the dead. And, indeed, there are many stories told in the Talmud and in later rabbinic literature of righteous men who were visited by dead spirits who came of their own accord, or of righteous men who happened to be in places where dead spirits were and conversed with them, and they clearly are described as not having sinned in the least. Because they did not summon up those spirits. They merely conversed with those who came to them, or upon whom they happened by accident.
If faithful Samuel were alive as a spirit, would he violate God's law and come to Saul at the behest of a wicked spirit medium?
I think the idea is that he had no choice: the reason that spirit necromancy is forbidden is because it compels an unwilling spirit to leave wherever it might be and appear before the necromancer in the world of the living.
Jehovah had broken off communication with Saul after Saul became unfaithful. Would he now allow a spirit medium to force him to speak to Saul by means of dead Samuel?
God has nothing to do with it. Samuel spoke for himself, giving no new message from God to Saul. He only describes what God did, and what God is about to do. And what God is about to do can hardly be surprising to Saul-- he seems to have had Samuel called up specifically because that is the outcome of the current situation he feels worried will occur.
Further, Saul did not see Samuel, but assumed the spirit was Samuel by the spirit medium's description. (1 Samuel 28:13,14)
The medium does not describe Samuel as Samuel. Saul specifically asks her to raise up the spirit of Samuel (28:11). And the text itself, in narrating, consistently refers to the spirit as "Samuel." Not "the spirit of Samuel," not "the spirit," not "the wicked spirit pretending to be Samuel." Explicitly as "Samuel."
In this regard, Ecclesiastes 9:5,6 says: "as for the dead, they are conscious of nothing at all...and they have no portion anymore to time indefinite in anything that has to be done under the sun." Since that is the case, we can be sure such "spirits" are not dead persons.
כי החיים יודעים שימתו והמתים אינם יודעים מאומה ואין עוד להם שכר כי נשכח זכרם׃ גם אהבתם גם שנאתם גם קנאתם כבר אבדה וחלק אין להם עוד לעולם בכל אשר נעשה תחת השמש׃
"For the living know their joy, but the dead know no such thing, nor have no more reward, for the remembrance of them is lost: neither the love they felt, nor the hate, nor the passion-- all have already been destroyed, and they have no further interest in this world, in anything that occurs under the sun."
What Ecclesiastes is describing is that the dead are no longer alive, and thus have no connection to the world of the living, nor any mortal feeling that might tie them to it, for they are not subject any longer to the same conditions in which we, the living, dwell.
This is one example of why it is generally a bad idea to make theology based on translated text, rather than the original: the translation may be inaccurate.
The demons, wicked spirits once angels, often pretend to be ghosts of dead persons to deceive people as to the condition of the dead.
Judaism doesn't believe in fallen angels. To the degree that it has accepted a belief in demons, they had a fairly narrow purview permitted them in terms of deceiving humanity, and all were bound to obey God. Nothing in the Tanach, nothing in Rabbinic Literature, has ever suggested that demons can or will impersonate the spirits of the dead.