A person is not morally culpable for things he does not will. Only if one deliberately seeks out knowledge of the past or future through occult means, or if one puts groundless faith in supernatural or occult phenomena is there a problem. The phenomenon that your friend is experiencing might not be occult but a form of private revelation. He should be careful, however, not to discuss this ability with impressionable souls. Sharing such knowledge with those who do not understand could be a cause of scandal. There may also be a danger that this person may be tempted to develop his supernatural abilities or exploit this knowledge. For that reason, I recommend that this person seek assistance from an orthodox and balanced confessor or spiritual director for help in dealing with this phenomenon in a manner that is in keeping with his Catholic faith.