Peru will be kicking themselves after giving up a two-goal lead, with Ecuador fighting back to rescue a point in their second Copa America Centenario match.
Cueva put Peru ahead just five minutes into the match, with Flores scoring a second before the 15th minute mark.
Enner Valencia gave his side hope when he reduced the deficit just before the break.
While Miller Bolanos scored the equaliser three minutes into the second half, with neither side finding the net in the closing stages as Ecuador defender Gabriel Achilier saw red for a second bookable offence.
The result keeps Peru in second position in Group B on four points with a clash against Brazil to come, while Ecuador is two points behind and will face Haiti in its final game.