I thought everyone knew some cheeses contain rennet. A should have researched the offered meal a little better, she was a poor host. It's a bit like cooking pork for somebody of Jewish faith and then blaming the Jewish person for not telling them they don't eat pork!
If a guest said, 'btw I'm Jewish' when accepting an invitation it would probably be common knowledge that pork should be off the menu. Maybe not so with Jews and rabbits or shellfish. Or Jews and poultry-plus-red-meat in the same dish.
Not so with rennet and cheese.
A didn't know what she didn't know and most likely said to herself, 'Ah, so B is a vegetarian, which is not a vegan, so B can have cheese.'
Someone with dietary preferences or needs that might cause a hostess to put extra thought or effort into creating a meal should state exactly what they would and wouldn't eat, far enough ahead of the dinner date to make it possible for the hostess to prepare a meal they would enjoy and that the hostess would be proud to serve.
B by her misguided assumption that A could read her mind and was au fait with the ins and outs of the production of a commonly used cheese created a situation where everyone lost instead of trying to create a win-win.
Vegetarian or not, you have obligations as a guest. If your dietary needs warrant a message to your hostess and you simply will not or cannot eat whatever a hostess decides to cook, then it is up to you to not send what is in effect a coded message that you assume the hostess will understand.
Maybe you feel embarrassed to be specific about your dietary needs or maybe you have an assumption that something you know about parmesan cheese is common knowledge, but being a guest is not just about you. You should try to put yourself in the shoes of the person who will be going to some expense and working for a few hours to prepare a meal for you.