There is another clue, I think: Ed's descriptions of the other characters when you have him look at them.
Compare, for example, Anna's opinion of Ed when you have her look at him: she talks about how she feels about him. It's been a little while since I played the game, so my memory of the thoughts given by others is rather faint, but I seem to recall that they follow a similar trend: they describe each other in terms of how they each feel about the others, describe them as people.
Ed, on the other hand--if I recall correctly--describes the others in terms of what they can do for him; perhaps most tellingly, when you have him look at Anna--who his actions seem to imply he might be falling for--he describes her as the means to getting to Dr. Morales' technology. Not as a pretty girl. Not as someone who he might have conflicted feelings about. Not as someone who he's concerned about. As a means to an end.
I'll confess that I didn't see the twist coming--I think that I held some degree of suspicion regarding Ed, but hadn't guessed that he would turn traitor--but I do think it rather well foreshadowed.