Is it possible for you to do upper body exercise when in an immobilizing foot cast?

Yes- esp. if seated. As long as you are not applying more than the simple weight of your leg and otherwise abiding by your physician's activity limitations, you should be able to participate in a myriad of upper extremity exercises and utilize any of the upper extremity lifting machines that allow for a seated position.