My dictionary says 罠にかかる but I imagine that that is for snares. How would you say trapped as in "I am trapped under rubble" or "The people were trapped under a building."?
(罠に)かかる is as you said appropiate for snares. You could use 閉じ込める (active). So if you were trapped under rubble you can use passive form:
がれきの中に閉じ込められた。
Well with your example I would say this,
"trapped under rubble" = 瓦礫{がれき}の下に生{い}き埋{う}めとなった
The emphasis on "生{い}き埋{う}め" being the key phrase for trapped (buried) under some rubble. Which means you are literally trapped alive under rubble, or say for example a buildings rubble.
You also have something like this,
"I was trapped in a room" = 部屋{へや}に閉{と}じ込{こ}められた
Which has the emphasis on the 閉{と}じ込{こ}める
The phrase "trapped under" can be rendered as "~の下敷(したじ)きになる/なった".
So, one way of translating "I am trapped under rubble" is "がれきの下敷きになった".