Roy Hodgson's England played out a 2-2 draw with their fellow FIFA World Cup participants at Sun Life Stadium in Florida but the match was marred by a clash between Sterling and Ecuador captain Antonio Valencia.
Tempers flared inside the final 10 minutes after Sterling came lunging in towards Valencia and the Manchester United winger reacted angrily, grabbing the Liverpool youngster's neck.
Both players received their marching orders as a result, though Sterling will only be suspended for England's final warm-up match against Honduras on Saturday.
"It's a bit of a shame especially in a friendly game like that. I think there was no real need really," said Lampard, who skippered England in the absence of Steven Gerrard.
"It's a bit disappointing for Raheem really because he's come on and he's trying to do the right thing, track back and try and make a tackle and that's what happened."
England will go head-to-head with Honduras in Florida, before flying out to Brazil, where they will come up against Italy, Uruguay and Costa Rica in Group D.
Get the best features, fun and footballing frolics straight to your inbox every week.