You say the application is old, but nothing about the OSes you're running it on. Unless you're running it on 16-bit Windows or NT 3.x, there's no good reason you can't just migrate to Winsock 2. You can download Winsock 2 for Win95, and it comes in all later Win9x OSes, as well as in Windows NT 4 and up.
If you really must run this app on Win16, it may be possible to dig up one of the third-party Winsock stacks from that era that did offer raw sockets support, but that sounds like a huge hassle, if you want to do it legally. Easier to just specify Win98 as a minimum OS version and move on.
EDIT: I'm assuming you can do what you want with raw sockets, which requires moving to Winsock 2 if you must use the built-in Winsock in MS operating systems. Changing your program to use Winsock 2 instead of Winsock 1.1 is easy; one library change, one header file change, and a change to the WSAStartup
call, and there you are. Raw ICMP sockets let you construct any ICMP packet you want, and in newer OSes you may be able to listen for ICMP packets, too. If it turns out that the stack won't let you listen for the packets you need via sockets, you can do it with packet capturing techniques instead.