How could we report "You may leave the room"Teacher said Can we report it as Teacher gave me the permission to leave the room OR Teacher said to me that I might/could/may leave the room. May,might or could is all are possible.
Both your suggestions are basically correct. There are some minor errors with the use of "the".
The teacher gave me permission to leave the room.
The teacher said I may leave the room.
The teacher said, "You may leave the room."
These mean the same thing because saying "You may leave the room" is how one gives permission. Other words are possible. "Can leave the room" is less formal than "may" but is more common in spoken English.
Permission is an abstract noun. We use "the" with abstract nouns rarely. It can be used to contrast a particular specific instance of the abstract instance. "The permission I received from my teacher was dependent on my return within 5 min". That is not the case here, where you are speaking of an indeterminate instance of permission.
I received an apple from my teacher (countable)
I received permission from my teacher (abstract and non-count)