Thank you for asking this question. I simply don’t have enough information to make a diagnosis or to reassure you about whether the “friend” in your head is dangerous. I suppose it depends on what he is telling you or asking you to do. It could be simply that you discovered as a child that it helped you solve problems if you had a dialogue with your imaginary friend. Or it could be that you might have developed an “alter” to help you handle undue stress.
I urge you to see a therapist who can hear your whole story and who can therefore help you figure out whether this is something you should be concerned about. If not, you will have the peace of mind of knowing you’re okay. If, in fact, you have MPD, you can get treatment. Either way, it sounds like you could use some support to help you deal with the “stressful stuff”.
I wish you well.