Both of them are correct. But yes, they do mean different. I feel that 'have a dinner' refers to event and 'have dinner' refers to actual supper someone(maybe speaker) going to have. For example, "We have a dinner planned at Joe's, hurry up!" showed that speaker has 'event of dinner' and "Have dinner son, we are camping out in lawn." showed that speaker is telling to his son to finish(start and finish) supper.
I have used these words like this, maybe wrong.