The midfielder had given Spurs the lead at Wembley, celebrating with his trademark 'floss' dance. However, United would hit back through Alexis Sanchez and Ander Herrera to secure a 2-1 victory and break Tottenham's heart.
Lampard, who now works as a pundit on 'BT Sport', commented on the celebration, warning Alli to chose his moments to gloat better.
"I think Dele Alli has learned a big lesson there that don't celebrate too early and dance too early," the former Chelsea midfielder said.
"This isn't me being too jealous because I can't do the floss as I've been reliably informed and I can't do it but that's not why I'm saying it.
Lampard continued: "I just think in a big game like that when you've got 80 minutes left against Manchester United, I think you've got to be careful.
"You can do that for the third goal maybe in the 90th minute and I think the game changed on. It's a small thing [and] it's a small detail but it does matter and I think he would have learned a lesson yesterday."