Yeah it basically means doing something you like or enjoy.
Some examples:
Later on I'm going to treat myself to a bottle of wine and a good movie.
Person 1: Are you having dessert?
Person 2: Nah, I'm trying to eat more healthily these days.
Person 1: Go on, treat yourself!
I'm going to Rome next weekend for a city break... you have to treat yourself every once in a while.
Espero que sea de ayuda Carlos.