A Captain America movie could have done a similar scene, Captain America has many world war 2 stories, which does make it have some similar things with saving private ryan,
there is nothing in the source material that says it is not allowed. In fact now that you mention it. The Wolverine is a Marvel film and had a somewhat similar kind of violence that was still stripped down a bit to PG 13 but it did lay the grounds for Logan to move on to R Rating. Let me just post it here. Another World War 2 scene that does not really sugar coat the harshness of war even in a comic film that is in default way below a film like Saving Private Ryan.
World War 2 and wars in general are violent, traumatising, bloody and scary and sad, they should shake us when we see them and give us an opportunity for us to see that the characters are experiencing at the most basic level of human emotion, that is the purpose they serve and the reasons movies that can push those grounds get more acclaim beyond just fun jokes and cgi 3rd action arc that cannot even get any convincing critical praise anymore now.
Not to mention, there is a special appeal that attracts much older comic fans, some who are now even grand dads but read some of the comics in the 60s and 70s, that will appreciate this a lot compared to the many millennials comic fans who can be quite ignorant of superhero/comic books stories.