I am going to write down several equivalent ways of saying "treat you to something".
(1) Yesterday, John treated me to lunch.
(2) Yesterday, John bought me lunch.
(3) Yesterday, John and I had lunch. It was his treat.
(4) Yesterday, John and I had lunch - his treat.
(5) Yesterday, John and I had lunch, which was his treat.
Grammatically, I am pretty sure that (1) to (4) have no problem. Does (5) make sense?