I'm sorry. I didn't read your original question carefully enough (guess I was just tired). You're using the modem for an Internet connection. That means YOU don't own the modem; Dial-Up Networking on the other machine does. I don't think you can send the command string I was suggesting.
I guess you'd have to get the TCP/IP DLLs on the other machine to shut down. I'm not very familiar with this, but I would think that they would do this on their own, provided the connection from ICS on your machine was terminated. Since ICS is supposed to be transparent to programs, my guess would be that you'd shut down your local connection to ICS the same way you'd shut down a TCP/IP connection. But I'm afraid I don't know how to do this.
Is this failure of ICS to disconnect the modem a documented fact? Maybe you've got a local listener process still running, and that's keeping the connection alive. Check your Task List for other Internet-related programs that might be getting started inadvertently. I hate to say it, but you might even have a Trojan Horse virus that's keeping the connection open. Rick Sprague