> E.g. Armies operate hospitals for it wounded soldiers. Can your software be used in an army hospital?
This is clear cut military use. I'm not sure why this is an example of ambiguity.
For private company it's up to their lawyers. I'm sure this is in part of why this is being done to make it harder for companies to support the military.
>how do you enforce it
This is addressed in the comment? Besides which internal company lawyers will enforce it and perhaps somewhere along the line it'll be so blatant somewhere a lawyer will take up the cause and get OP a lot of money.