exactly, the Most High can do anything He wills. i wouldnt be teaching the dead do not talk to the living when the dead do talk to the living in the bible.
Saul was never condemned for talking to the dead, he was cut off from the Most High, and that divine knowledge, and he tried to get information from the Most High anyway.
also important, Saul had no interest in speaking to Samuel, he only cared about the knowledge Samuel had access to.