I still think it depends on whether you were actively seeking communication with them or not. If some ghoul just decided to appear to you one night, I don't think it means you're guilty of divination. Or maybe it does - some people say that these spirits need "legal permission" first before they can mess around with you. Like if you play with a Ouija board or something, you've just given them the invitation they need.
Not sure how you'd tell for sure if a spirit was good or evil. I guess you'd have to get the elders to find his record card to see if his hours are above average or not.