Sockets are a transport layer feature e.g. TCP or UDP. ICMP works at the network layer and has no notion of sockets.
Some systems (Linux, Darwin) also implement a special icmp socket type which can allow unprivileged ping.
[1]: https://man7.org/linux/man-pages/man7/ip.7.html
Are you just trying to point out the misnomer?
Sockets are a transport layer feature e.g. TCP or UDP. ICMP works at the network layer and has no notion of sockets.