There are not many tools that use WM_ICON_NAME as it is often assumed to be set to the same as WM_NAME. You can list all the window ids and run xprop on each of them to get a line such as
WM_ICON_NAME(STRING) = "myname"
and then use awk (or similar) to extract the quoted part of this and compare it to the wanted string. Here's a bash function findicon taking one parameter to do this:
findicon(){
local myname=${1?}
wmctrl -l |
while read id rest
do xprop -id "$id" WM_ICON_NAME
done |
awk -F'"' -v myname="$myname" '
{if($2==myname)found=1}
END {exit !found}'
}
if findicon 'my icon name'
then echo 'found'
fi