There is an important discussion between Harry Potter and Dumbledore, the wise and powerful headmaster of Hogwarts, towards the end of book 6. Dumbledore tries to impress upon Harry that the student is not being forced to fight the villain Voldemort, even though there is a prophecy that implies that he will. Dumbledore points out how Voldemort took this prophecy as the final word, and because of this ended up through his actions setting in motion the prophecy's fulfillment. Dumbledore argues that this is the wrong attitude. There are plenty of prophecies that are not fulfilled (note that I am specifically emphasizing this point because it is crucial). Even though Harry wants to confront Voldemort, he should do it as his decision and not out of compulsion (pp. 510, 512):
[Dumbledore:] "If Voldemort had never heard of the prophecy, would it have been fulfilled? Would it have meant anything? Of course not! Do you think every prophecy in the Hall of Prophecy has been fulfilled?...This is no small disagreement between Dumbledore and Voldemort. It is a fundamental debate over man's free will. According to Voldemort, people are restrained in their freedom and are predestined -- at least when there is a prophecy about them -- for a certain outcome. According to Dumbledore, however, man is free to choose his own destiny. Therefore, even if one ends up following a prophecy, it is not because of destiny but because one has chosen that path.
"You see, the prophecy does not mean you have to do anything! But the prophecy caused Lord Voldemort to mark you as his equal.... In other words, you are free to choose your way, quite free to turn your back on the prophecy!..."
But he understood at last what Dumbledore had been trying to tell him. It was, he thought, the difference between being dragged into the arena to face a battle to the death and walking into the arena with your head held high. Some people, perhaps, would say that there was little to choose between the two ways, but Dumbledore knew -- and so do I, thought Harry, with a rush of fierce pride, and so did my parents -- that there was all the different in the world.
Note that without Dumbledore's comments about prophecies not coming true and Harry's ability to turn his back on the prophecy, one might have thought that he also believed in determinism but that one should choose one's fate with pride, even though it is predetermined. But the comments just mentioned indicate that Dumbledore believed in complete free choice, even in the face of a prophecy.
There is a distinct parallel between Voldemort and Oedipus. Recall that Oedipus had learned from an oracle that he would kill his father and marry his mother. Despite, or perhaps because of, his best efforts to avoid that fate, he ends up creating the situation in which the prophecy is fulfilled. Voldemort's situation is very similar.
In his book Be-Ikvos Ha-Kuzari, of which an abridged English translation appeared on VBM-Torah and a complete translation will be published by Yashar as In the Footsteps of the Kuzari (the passage discussed here is not in the VBM-Torah version and will be in volume 2 of the Yashar edition), Prof. Shalom Rosenberg compares the Oedipus story with that of the wedding of Rabbi Akiva's daughter. The Gemara (Shabbos 156b) tells the story:
R. Akiva had a daughter. Astrologers told him that on the day she got married a snake would bite her and she would die. He was very worried about this. On her wedding day, she took a brooch and stuck it into the wall and it sank into the eye of a snake. The following morning, when she took it out, the snake came trailing after it. "What did you do?" her father asked her. She answered: "A poor man came to our door at night and everyone was busy at the party and no one took care of him. So I took the food that was given to me and gave it to him." He said to her: "You did a mitzvah." R. Akiva went out and said: "'Charity will save from death' and not just an unusual death but death itself."Prof. Rosenberg (ch. 42) explains:
This story is a powerful statement against the belief that everything is predetermined. The contrast between these two worlds is evident. The astrologers ascertained man’s predetermined fate. It would seem that they were right. Yet their prophecy is not absolute; escape is possible.It seems to me that on this issue, Dumbledore and R. Akiva are exactly aligned.
(Note that one can equate the "prophecy" in Harry Potter with the Talmud's astrologers' predictions. However, even prophecies need not come true in many circumstances. See here and here for more details.