Did the pop out of the hub or the rim?
If it's the hub, did the pop out because the hub holes got enlarged? If yes, you need a new hub.
If no, and the spokes wiggled around enough to wear the heads down, then you need new spokes.
If the popped out of the rim, did the nipples pull thru the rim? If yes, then you either need a new rim, or new nipples, depending on what wore out.
Did they just loosen up and fall out because it's a crappy wheel and you never adjusted spoke tension?
Then your threads may be stripped on either your nipples or spokes, or both.
Yes, you'll have to remove the sprocket. And the tire. And the tube. And the rim strip.
And DON'T EVER use loctite on your nipples. I mean, you can, since most people nowadays don't understand proper wheel maintenance and just wait till their spokes fall out and then replace the whole wheel with another piece of crap one, but if you build and maintain your own wheels, you know you're gonna have to true them at some point and don't want to fight every damn nipple because they're all gunked up with loctite.
Edit: every time it says "the" instead of "they," in that pile of words I typed, is because this site uses some f'd up autocorrect system that makes it impossible to type a simple sentence without it sounding retarded.