Khandro, dogs only have a second or two, to associate behaviour and reward. Which is why some use clickers, to make it more immediate.
It would be impossible to give a treat to a "lunging" dog... you do it from when you see another dog, until it passes by. It won't get one, unless it is focused and next to you. That is what the dog thinks as being "rewarded". They are instinctive, not like people, and don't think back to consider "previous" behaviour. It has to be instant.