I wouldn't be concerned with corals (unless there is nipping from the fish of course) but nems on the other hand I wouldn't trust with a fish that small. I watched my carpet eat 2 percula clowns who just tried to do the natural thing.
I do know that carpets are one of the more aggressive nems but any nem is capable of doing it.
The carpet in question here also has a mandarin, Blenny, couple of damsels, and 2 small tangs that I am aware of under his belt.