To determine wether one is a prophet we must first define our terms. What exactly is a prophet? In essence, prophecy is solely based on the acquired intellect. Prophecy, according to the Rambam is specified by intelligence. Knowledge is key and is, therefore, the pre-request for prophecy. This includes the investigation into metaphysics, philosophy, and science. Those are the credentials for prophethood.
Accordingly, when emanation from the overflow of Active (or Agent) Intellect enters a person's rational faculty and imaginative faculty, alluding a person's reasoning abilities to foresee the future, a prediction is made. For prediction is a manifestation of intelligence. But this is not entirely true for a prophetic vision may be expunged or canceled. Hence a prophet can only see what ought to be and not what will be. That is to say, when prophecy is revoked, it is not the cause of G-d but the nature of the person's continuity at work. Thus prophecy is a natural event. Which is to say, though intellectually gifted, a healthy-wise person may befall dire circumstances that prevent him or her from prophecy, say if the person becomes sick or ill, preventing them to think. When such a divergence is inevitable, the prophecy may be lost, if not compromised.
But it is more than the cold calculated intellect at work. Such a person must be moral in all aspects of life if they wish to become immune to natural law. The Rambam states that a prophet is a moral person who loves G-d yet "love" is an emotion and the Torah cannot ascribe a feeling to G-d. When the Torah commands us to love G-d it is expecting us to put that "love" in the form of application. That is, in accordance with right action, right speech, and right thought, one should study G-d's Creations. This is what it is meant when the Midrash says Abraham discovered G-d by studying the heavens, natural law, G-d's laws. This is similar to Plato's Republic, who explains the perfect lawgiver, a Philosopher-King, who has reached ultimate perfection. A perfection which Maimonides attributes to a prophet.
Thus the qualities of a prophet, Maimonides affirms, is not secluded to Israel alone but is entitled to everyone. Even non-Jews can become prophets. Indeed, Maimonides considered Aristotle to be a prophet because of his immense intelligence. Thus a prophet is a person who loves G-d, develops his or her intellect, and can use midrashic imagination to carry out G-d's will.
If a person does not meet these requirements as described above, you do not have to listen to him.