Correct punctuation before a name or list of names
Solution 1:
If you’re addressing Bill, the question doesn’t arise, because we don’t use commas in speech. In writing, I invited my cousin, Bill suggests, as you say, only one cousin, whereas I invited my cousin Bill suggests there might also be cousins Jane and Andrew and perhaps more besides. If you’d organized some occasion for your extended family, and you said I invited my cousins Bill, Jane, and Andrew that, by analogy, might suggest that they you had cousins who were not invited. On the other hand, I invited my cousins, Bill, Jane, and Andrew might suggest that they were all the cousins you had. In practice, there are likely to be other clues in the linguistic and social environment helping to resolve any ambiguity.
You probably know that the use of commas in this way, and the designations ‘restrictive’ and ‘non-restrictive’ (alternatively, ‘defining’ and ‘non-defining’) are more usually applied to relative clauses. In the sentence I invited my cousin who lives in Australia, the clause who lives in Australia is restrictive and leaves open the possibility of cousins elsewhere. In I invited my cousin , who lives in Australia, the clause who lives in Australia is non-restrictive, and doesn’t. (The authors of ‘The Cambridge Grammar of the English Language’ use the terms ‘integrated’ and ‘supplementary’, which seem preferable.)
Solution 2:
After reading this I would say that option B is correct. If your cousin's name was Bill, that would be a restrictive appositive and there would be no comma.