Would Mormons accept communion, administered by a representative of another Christian denomination, as valid? There are considerable differences in some beliefs between Catholic and Protestant churches on one hand, and the Mormon church on another hand.

One of these is the belief in Trinity due to which, according to the answers to this question and this question, Lutheran/Protestant churches do not view Mormons as Christian. Another difference is the symbols used with the communion, being that Mormons use water instead of wine (as is explained in the answers to this question).

Now considering some more exceptional situation, such as when serving in U.S. military during a war, as in the book cover shown below, would Mormons accept communion from military chaplains that may not be Mormons?

Or would a Mormon in this case not participate in the communion, or have the communion on their own (or possibly request a Mormon chaplain)?
A better answer would come from an actual LDS war veteran, but I would imagine that a Mormon in the military may participate in an available ceremony as a symbol of friendship, unity, and support with the rest his regiment. Although they may participate, Latter-day Saints maintain that ordinances are only authorized when exercised by the Priesthood of God, which is had His Church only (the LDS Church). That's not to say the ceremony by the non-LDS chaplain is not beneficial to the Latter-day Saint&mdash;it still provides him a blessed opportunity to worship with other Christians who share the same fundamental beliefs&mdash;it just is not binding in heaven. In fact, I think any decent member of the LDS Church would encourage, not disparage, participation in available Christian worship services.

You can find out more about the LDS Church and military relations on its website: https://www.lds.org/callings/military-relations/organization-leader-responsibilites?lang=eng and https://www.lds.org/callings/military-relations/military-chaplains?lang=eng. There's nothing particularly quotable but it should give good background. I think the point is that this is up to the individual member's conscience. Other questions and answers on this site go into detail about the Priesthood authority necessary for ordinances to be valid in heaven.

As an aside (that may or may not be relevant), I have personally met and informally interviewed a Latter-day Saint astronaut who commanded a couple Shuttle missions. I asked about how he worships in space. Even he, a Priesthood holder, needed to obtain authorization from his local Priesthood leader (bishop or stake president) before the mission to be able to administer the Sacrament if the opportunity arose. Of course, this was done privately in the extremely limited personal time allotted. But the point is, the administration of ordinances that are considered officially valid before the Lord is well organized, even... in space.