Yes, but it'll hurt like hell. My mom accidentally did that with her Remington 1100 20 Gauge once. She rested her thumb on the bolt when she fires.
But there's also the chance the slide breaks your finger first. Like my friend claims a guy once shot a Glock, and rested his thumb on the flat back of the slide. He claims it broke his thumb, and it sounds somewhat believable.
__________________
|