If you don't want to leave the group but you want to delete the messages, simply select a message and keep your finger tapped on that message. The menu should appear and then you will be able to delete the message. This applies only to your messages. You can't delete the messages of other people in the group.