It is, in fact, hard to source many of these meme-type stories from the internet. In this case, the story does, indeed, appear in many forms and with many attributions, including Einstein.
However, to discard this as false "because we can't source it" is a logical fallacy. To discard it "because it appears with other people's name" is a similar logical fallacy. To discard it, using broken logic, is also a logical fallacy.
I have seen the excuses, "Einstein didn't say it because he didn't believe in a supernatural god"... when in fact, Einstein didn't believe in a PERSONAL god (God), which isn't the same thing as not believing in a supernatural god (God).
I have seen many other logical fallacies applied to say "Einstein didn't say this" or "Einstein didn't believe in god"... and to say that, "it is false because Einstein didn't say it"...
Therefore lets do this:
Lets break this up into the two arguments:
1) Did Einstein have this conversation with a Professor?
2) Did Einstein believe in [god, God, or gods]?
1) Without being able to source this to anything written about or by Einstein, we can "assume" or "suppose" that he probably didn't say it. With all the writing about or by Einstein, one would thing something of this magnitude might have been confirmed in their writings. That it is not, is not proof that he DID NOT say it (proving a negative) but it is proof that it is unlikely that he did say it.
2) We do have many of Einstein's writings, either by or about him. He, at one time, was, in his words, "religious". Later in life, he became "agnostic" with a leaning toward the existence of a "god" or "God", but not the belief in a "personal god (God)".
We do know that he respected Religion, in general, but was not a follower of any one specific religion, including his own (previous) Jewish faith.
It is also repeated that Einstein said, "The more I study science, the more I believe in god (God)". Which cannot be sourced either.
We do have this, from a reply to a telegram from New York's Rabbi Herbert S. Goldstein on 24 April 1929 and reported in the New York Times on 25 April 1929, "I believe in Spinoza's God, Who reveals Himself in the lawful harmony of the world, not in a God Who concerns Himself with the fate and the doings of mankind."
And we know from his other writings, he doesn't believe in a "personal god (God)" which doesn't mean he doesn't believe in "a god (God)". For instance, from a letter to Guy H. Raner Jr. on 28 September 1949, "I have repeatedly said that in my opinion the idea of a personal God is a childlike one. You may call me an agnostic, but I do not share the crusading spirit of the professional atheist whose fervor is mostly due to a painful act of liberation from the fetters of religious indoctrination received in youth. I prefer an attitude of humility corresponding to the weakness of our intellectual understanding of nature and of our own being."
This puts Einstein in the same camp as many of our Founders who believed in "Nature's God"... a deist view.
I'd imagine Einstein believed in a god (God), just from this little bit from a statement to a German anti-Nazi diplomat and author Prince Hubertus zu Lowenstein, from around 1941, and as quoted in "Towards the Further Shore : An Autobiography" in 1968, "In view of such harmony in the cosmos which I, with my limited human mind, am able to recognise, there are yet people who say there is no God. But what makes me really angry is that they quote me for support of such views." I'd also imagine he would be just as upset by the false quotes of him supporting anything but a Deist, or Nature's god (God), or Spinoza type view of "god" (God).
There are many other quotes that support this view over at WikiQuote.
While we can, safely, say that Einstein probably didn't argue with a professor on the nature of god (God), the view of the god (God) expressed in that exchange isn't inconsistent with Einstein's view of god (God).
But to say that Einstein was anything less than "agnostic" or anything more than a "deist" might be stretching the truth as well.
The last point to make:
The exchange's purpose is to highlight the nature of God (god), or the nature of Good and Evil. Comparing this concept (these concepts) to "light and dark" and "heat and cold" are valid, in their own right. And maybe they deserve some further discussion, ignoring the actual author of the exchange.
In other words, to dismiss the exchange as false because the author is unknown or misattributed is also a logical fallacy.
The actual question, "Is this story supported by factual evidence or is it merely an anecdote to exemplify a point?" would need clarification to address some of these issues, but as it sits, the answer might well be:
The story, while almost certainly not an exchange by Einstein and a professor, attempts to describe the "nature of God" in an anecdotal way, which isn't to say the story is not "factual evidence" of God, which could be the epicenter of a very large discussion, but it is to say that Einstein most likely didn't have this discussion with a professor.
Topics for further review:
1) Is there a God?
2) What is the Relationship between God and "Good and Evil"?
3) Do "good" and "evil" have the same type of relationship as "heat" and "cold" or "light" and "dark"?
4) Is God a "personal God" or is God more of a "Nature's God" (Deist or Spinoza type)?
5) Does Einstein's view of God (deist in nature) contribute to the possibility that he may have said something like what the student says to the professor? Or is his view incompatible with the story's point? (in other words, does the story take a "deist view" or a "personal god view" or some other view?)