Is this possible? If so, how?
Perhaps for some edge cases - any significant water depth, and the pressure will deform the door, or water will leak in at the sills or through the walls, with any remotely normal construction. It might work for a few inches.
The polyurethane foam would be acting as an adhesive to hold the polyethylene plastic sheeting in place (until the water pressure does) and seal the edges. So presumably you'd spray a bead all around the door area (across the driveway, up the frame, across the door) to seal the edge, and spray some additional foam to stick it to the door so it does not flap too much. If you have more foam available, it would probably be wise to go back and spray along the edge of the plastic sheet once it has been placed, trying to overlap the edge with foam.
If you get 4-6 feet of water, I'm pretty sure the garage will get wet anyway, if it doesn't just float off (how much attention was really paid to the anchor bolts...?) 4-6 inches, might be fine if it stays stuck. Somewhere in the middle, the failures will start (height of the foundation wall above grade would be a good guess for a failure initiation point...)