It's safe, but probably won't last long. It's a predator of specific sponges, which probably don't grow in any abundance in your tank. Without being able to tell what species of nudibranch it is (which I can't from the pic) I can't really begin to guess what sponge it might feed on.
If you could answer a few questions it would help ID it. First, do you have any idea what part of the world it might have come from? Does the slug have a velvety texture or is it smooth? Do the gill tuft or "antennae" retract if you disturb it?
Another pic might help too. Try getting one of it in a shallow bowl of water looking straight down on it.