It's true that the Earth does not usually take exactly 24 hours to rotate, it's only 24 hours on average over the course of the year. However, the difference is only ever off a few seconds at most. Those seconds pile up across the days around perihelion and aphelion amounting to several minutes cumulatively but that doesn't affect the length of the day, only the amount that solar noon differs from noon on the clock.
The reason that days are a few minutes longer than nights at the equator is due to atmospheric refraction which makes the sun visible a little before it actually has "risen" and similarly, keeps it visible a little after it has "set".