Richard,
Eligible voters = those who have voting privileges (typically as determined on a specific date).
Eligible voters in attendance at a meeting = those who have voting privileges (typically as determined on a specific date)
and are represented at the meeting in person or by proxy.
A ballot should have never been provided to an ineligible voter (unfortunately, it does happen).
If a ballot was provided to an ineligible voter and caught before the ballot was collected. If it was and if it's determined that enough illegal votes were cast by illegal voters to affect the result, and these votes can't be identified and removed from the count, then the vote is deemed null and must be retaken.
If a ballot is deemed Illegal, which is a ballot cast by a legal voter but can't be read, voted for too many candidates, ineligible candidate or for a fictional character, then that ballot still counts toward the number of votes cast.
See
Robert's Rules for Voting by Ballot by Roberts Rules for Dummies (easiest language for the explanation I could locate).