I believe that Oedipus does have the right to be king. When he was an infant, a prophecy informed the King (Laius) and Queen (Jocasta) of Thebes that their son would kill his father and marry his mother. So the King did all he could to have the infant killed. (Without their knowing, Oedipus does not die, but ends up in the palace of Corinth, where he is adopted by the king there.)
Later, as a young man, Oedipus is attacked and kills the stranger and the slave who attacked him. When he solves the riddle of the Sphinx who had terrorized travelers for so long, he is welcomed to Thebes, and is encouraged to marry Jocasta. He has no idea this is his mother.
It is only after receiving the news of his part in his father's death, and then realizes that he is married to his mother, that Oedipus gives his throne to his uncle (Creon), blinds himself as punishment, and banishes himself from his kingdom.
Oedipus did not knowingly kill his father and marry his mother. In fact, it was his parents who were at fault—by trying to kill him, fate brought Oedipus to the crossroads to defend himself against his father's attack, and then on to solve the Sphinx's riddle. Had he lived with his parents all his life, this would not have happened.