The Winter Soldier took the stage in the second installment of Captain America. Bucky Barnes had been experimented on by Hydra to forget his identity and become an assassin.
The end of the sequel sees him recovering a bit of his past self and saving Cap from drowning. Then, he vanishes. But Civil War will reintroduce Steve Rogers's friend and foe. In what capacity, I dare ask?
It's not so simple to assume he'll be on Cap's side just because they used to be friends. And to infer a possible commitment to Tony Stark, that too has its shortcoming.
Plus, Bucky Barnes is consumed by an inner process: he has to live with the consequences of his former life as a Hydra dog of war. Being an assassin is not something to easily get over in order to start again with a clean ledger.
Winter Soldier on Cap's side?

Everyone is ready to assume that. Yes, they were friends. Best friends, even. Yes, in the end, the Winter Soldier remembers. Does that mean we can put money on his allegiance to Steve Rogers?
Not necessarily.
