Lenin Moreno, Ecuador’s leftist former vice president, had 51.17% support compared with 48.83% for Mr. Lasso, with 99.5% of the votes counted from Sunday’s vote, according to the national electoral council.