The designation of friend or foe is only relevant to the spell that asks you to choose. A player you call your friend doesn't become your teammate, and the next “friend or foe” spell you cast could name that player your foe.