He acted like it was
his father's spirit talking to him though, didn't he?
I don't exactly rewatch these eps a whole lot
If you spent enough time with a person and you could access all your memories and understandings of their viewpoints you could come up with their advice in a given situation. Really, it's a matter of getting out of your own rut and being able to see what someone else would see.
He did act like his father was talking to him.
However, it is kind of like a dream I guess. My mother died a few months ago and if I had a dream where she was there, giving me advice or something, I suppose I would not ignore it as just a dream. It would probably feel very real to me. So in that sense, it probably was supposed to feel very real to him.
However, they never clarified if it was his father or not. Considering Star Trek never, in any series, gave a clear view on religion or afterlife, I am inclined to say it was just an advanced state of dreaming. Like a shamanic experience, but without all the peyote.