Since ICMP and ICMPv6 have different IP protocol numbers, it's technically possible for an IPv4 host to receive an ICMPv6 packet or for an IPv6 host to receive an ICMP packet. Is the host's behavior in this case specified by any standard? I haven't seen anything in any RFC.
RFC 8200 states that the "next header" field in IPv6 uses the same values as the "protocol" field in IPv4.
However, RFC 4443 states:
Every ICMPv6 message is preceded by an IPv6 header ... The ICMPv6 header is identified by a Next Header value of 58 ...
And RFC 792 states:
ICMP messages are sent using the basic IP header.
I interpret these two statements in the way that ICMP packets are not only identified by the "protocol" or "next header" field, but that this protocol is identified by a logical
AND combination of IP version and "protocol" / "next header" number.
This would mean that a "protocol" value of 58 in an IPv4 packet does not mean ICMPv6 and a "next header" value of 1 in an IPv6 packet does not mean ICMP(v4).
If this interpretation is true, you have to react the same way as if you received a packet with an unknown "protocol" or "next header" number.
ICMPv4 is encapsulated in an IPv4 packet, and ICMPv6 in IPv6. There is no way an IPv4-only host would receive and parse an IPv6 packet (and vice versa).