My answer to your question in OP is No. This is purely from a moral/religious point of view and considering the geopolitical situation of today (and not the past).
For an army soldier, he has to comply with the orders of his superiors. And there are plenty of times during one's career that he will have to execute the politically motivated orders given by superiors. It's not black and white as some people think it to be.
Politicians of two countries can always shake hands later on and become friendly for some time period, but the real cost is borne by poor families of army soldiers who die in 'unprovoked' cross firing along borders (the cross firing that may be done merely on the orders of politicians and/or army generals who just wants to send across a message or in retaliation or to take public's attention away from something). The died soldiers (who on both ends may be Muslims) get a medal and a title of a 'martyr'.
Consider this, Saudi Arab's army is fighting against Yemen's (rebel forces) and Iran's army. All 3 states are Islamic countries and their soldiers are primarily Muslims. Pakistan's support is also sought and our army may very well be there. So in the mutual fight, soldiers kills the soldier of the other country. Civilians, kids, women etc also get killed but well that's collateral damage isn't it? Yet both of the soldiers when they die in the battle will be labeled as martyrs who have died to protect their respective countries. But what they really did was to take and execute orders from their seniors. Not much to do with Islam. Whether it was moral or immoral is for the world and politicians to decide. The politicians and respective Govts may announce peace and then all is good. Martyr status however remain for all of them and it's the only solace their families will ever get. Whether it would be good enough in afterlife in front of God is another matter by the way!
Points to ponder well enough before taking the decision to join army of any country in today's world.