Yes, that small piece of plastic was holding your entire axle in place.
that's just a "seal" to keep stuff out of the outer axle tube. Which doesn't really matter at all. It's not important. You can try and push it back over a little if you want but you don't need to. I'd take a look at all your bolts etc like track bar shocks etc make sure they are tight and brackets/bushings are good.