"Sheree, I'm so glad you and Fred can make it over for dinner next Thursday! Is there anything you or Fred are allergic to, or just can't eat? No? Well, I was thinking about spaghetti, if that's OK? Great! See you Thursday!"
"Mary, thank you so much; Tom and I would be delighted to come for dinner on Wednesday. You remember I'm a vegetarian and Tom can't eat mustard, right? Oh, you're making fettucine alfredo? It's my favorite! Great! See you Wednesday!"
In other words... it's both the hostess's responsibility to ask on issuing the invitation; and
the guest's to remind the hostess well in advance, especially if the hostess forgets to ask. It's the belt-and-suspenders theory.