Can I put rigid foam on studs to prevent thermal bridging?
It's common to do the reverse...clad the outside in foam insulation to prevent thermal bridging from that side.

Your idea is sound. I'd suggest using full panels and then tape them. That would add additional insulation to the entire wall and also act as a Vapor barrier for you.

Another technique is instead of using insulation, install 1x2" slats horizontally across the studs every 16" and install the sheetrock to that. The theory is the same in that the only bridging would then be and the small points where the two pieces of lumber meet.