I think it's a bit daft all these people saying the teacher/OP should just tell a child f 6 not to ask "personal questions" or to "mind his own business" and just leave it at that. How is a 6yo supposed to infer from that what is "personal" and what is "his business"? Is it his business to ask his friends what they did at the weekend, or their favourite colour? If it's personal to ask about who they live with, is it personal to ask if they have any pets?
I don't think it's fair to expect young kids to just wander through a minefield of unexplained social mores and only find out what they are when they step on one and get their metaphorical legs blown off. If they misstep, they need an explanation as to how - not necessarily on the spot but at some point, or they learn nothing.
Agree though that it's odd for a 6yo not to have any idea of the various reasons other kids' families aren't like theirs. This is a big job for parents when kids are super young onwards, ESPECIALLY if like @bellie710 above you live in a bit of a monoculture - same with racial difference of you grow up in a twee little village with only one black family, it's very much on you to use the (numerous) age appropriate resources to normalise other races/family set-ups to your young kids.
People always say kids "don't see difference" as an excuse not to have to talk about it, as if talking about it is what causes the problem - this is rubbish, they see it instinctively from tiny babies and it needs to be discussed and managed.
I made the mistake of thinking because I live in a very mutlicultural city and my DD was in a nursery with kids and staff of different races, I didn't need to explicitly have the discussions with her about people looking different and that being ok - I thought she'd learn that through immersion. Until I found she'd segregated out all her Asian and black Playmobil characters because they looked different to the (white, blonde/brunette) ones that looked like her and her parents 🤦♀️
On the other hand, I come from a very complicated blended family so I have lots of opportunities to talk to her about single parent families, adoptive families etc etc so she has zero expectation that her friends will have a mummy and a daddy or that all their siblings will have the same parents etc. You have to actively consider where the gaps are in your child's experience of difference and fill them in with stories/discussions/examples. Children aren't perfect little egalitarians who get twisted into prejudice by society; we're pack animals by nature and the good thing about society is it gives us the opportunity to overcome those instincts.