Fortunately I haven't had to experience this lol; but I just always approached a photoshoot with the understanding that we're there to shoot photos, and create art. She has no interest in me other than my ability to take photos, and I should have no interest in her other than her ability to look/pose the way I want for said photos. Going into it with a clear understanding of what is and isn't to be expected makes it easier to be around beautiful women all day. It's no different than if you work a 9-5 desk job and Sally from accounting is super hot, dresses with form fitting outfits or low cut tops...you just try to maintain your sense of professionalism and not entertain any thoughts of anything that might lead to a sexual response by your body.
IF it were to happen, I think you could just excuse yourself, go to the bathroom, splash some cold water on your face, make a phone call outside, etc. It's nothing to be ashamed of, and as long as your not standing over her with a rager while panting heavily and grinning I doubt there's much reason to be offended if you're the model. I talked to a model (she shoots mostly nudes for pay) who said it happens from time to time...yes, she had a good laugh about it...but she said she just let the guy go sit down and compose himself before they kept shooting. I imagine if you're a creeper (a little too hands-on/touchy feely when it isn't necessary, too many "Oh your ass is hot!" type comments, and just a disheveled/sketchy look about you) then arousal will surely be handled differently. If you're polite, respectful, and professional, it'd probably just be awkward at worst, or just ignored.