I’ve done this a few times in the past as well. But I found it’s less stressful for everyone if you preface it first like, “You’ve been really helpful. Can I tell your manager or mention you in a survey or something?” (Note: direct managers at stores don’t always have the ability to do much to reward good employees and it might be more helpful to fill out a survey or something that corporate sees.)
I would be worried about angering the manager if they learned that this super-helpful employee spent half an hour chit-chatting with a customer instead of doing other tasks. Kinda like how agents are under time pressure in call centers.