There is nothing in an absolute sense that makes military service incompatible with Catholicism. I suppose in the vast majority of instances it is compatible, and in many cases even laudable. But there are those exceptional cases when a member of the military might find himself in a situation where he has been given an order that seems to him objectively evil. The obvious example is some of the orders given by the Nazis in World War II. Also the My Lai Massacre in the Vietnam War comes to mind.
The problem is that upon joining the military, at least in the US and probably in every other nation, the person takes an oath to obey orders without question. The idea is that in some cases the higher up commanders have information that the lower level soldiers do not have, and the commander cannot always explain the reason for every order. So an order can seem immoral to an enlisted man when it might not be in any absolute sense. But then it is possible for an order to really be immoral, as we have seen happen in history.
That brings us to the matter of the oath. If the Catholic takes such an oath, is he binding himself to following all orders, including immoral ones? Or can he “cross his fingers” and say the words without meaning it? Or if one has so much confidence in the goodness of one’s military that such a person could perhaps take that oath of obedience without worry?
I don’t believe I have answered the question, but I hope I have opened up some avenues of consideration.