The prophecy states: "Neither can live while the other survives"—meaning as long as one lives, the other cannot. It does not specify who kills whom.
Possible outcomes:
Thus, Harry being a Horcrux allows his return after mutual destruction, fulfilling the prophecy's condition that neither can live while the other survives—until one permanently dies.