Unless everyone is using iMessage, there's no way to remove yourself from a group text — you'll need to mute or block it.
You can delete a message on WhatsApp so that it will no longer appear in the chat for yourself, or for everyone else.