Yes, often history ends up being pretty clear on which was which. This isn’t meant to introduce moral equivalence when there isn’t any. But sometimes the situation is more ambiguous, such as liberation wars fought without respect for the laws of war.
So, what word to use when you want to remain strictly neutral, for example, when trying to communicate with people on both sides of the conflict?
“Rebel” sounds good, except that, at least in modern times, I at least perceive somewhat of a (positive) connotation of rebellion against oppressive central governments.
The term “rebel” is either good or bad depending on who both you and the rebels are. The West might tend to view Syrian rebels fighting against the Assad regime as good because Assad is a dictator and supported by Russia. Houthi rebels in Yemen might be seen as bad because Saudi Arabia is officially an ally of the United States, and the belief that the rebels are supported by Iran.
The most neutral term I think is either “soldier”, “forces”, “troops” or simply “fighter”.
After considering disagreements from other users, I’d like to add their point that “soldier” and “troops” can often suggest members of a state/country’s army, and that “fighter”, quite distinctly from soldier, often suggests they are not soldiers of the state or country’s army, thus delegitimising them and pejorating the word.
I agree with this, but I’d like to mention that all dictionaries I’ve checked define “soldier” as a member of an army, and that no dictionary I’ve seen necessarily requires an army to be state-controlled. Army often does refer to the military of a state, but doesn’t have to.
When looking at the Wikipedia article on resistance movements I noticed an interesting line related to your question:
In the media, an effort has been made by the BBC to avoid the phrases
“terrorist” or “freedom fighter”, except in attributed quotes, in
favor of more neutral terms such as “militant”, “guerrilla”,
“assassin”, “insurgent”, “rebel”, “paramilitary” or “militia”.
Resistance movement: Freedom fighter
I don’t think many people would regard those alternatives as totally neutral, but apparently the BBC considers them “more” neutral than terrorist or freedom fighter. More specifically “terrorist” and “freedom fighter” can be seen as terms of approval or condemnation by a writer. The other words are less likely to be seen as such, and more likely to be seen as mere descriptions of the fighters.