It can't be done, but I would be tickled pink if the left image was the default icon and the right image was the icon if I have notifications waiting for me. 🤣
I don't know anything about iOS development. I know it's possible to add pills to an icon if you have notifications, but I have no idea if iOS gives you the ability to change what the icon looks like. Because we'd be talking about a PWA, the tools may also be a little different.
As for browsers, I actually misremembered how favicons worked. After refreshing my memory, This is actually much less effort than I originally expected. Assuming an instance wanted to implement this, they could just change the link that defines the icon based on the currently logged in user's number of notifications.