Teachers are used to spotting "selective deafness" when children prefer to do things in their own sweet time or not at all. Alternatively if the child is generally well behaved and no trouble, it could be medical.
If the teacher has suggested a check up it sounds more like the latter. Your GP is playing safe and making an appointment, but I agree with you, no harm checking the behavioural side of things beforehand.
Easiest is getting DD to come for a chore then a treat. If she's elsewhere in the house preferable doing something she likes, give her a call, see how fast and willingly she responds.
Can you involve DD in making biscuits? Or something craft oriented like Christmas cards? When you start, begin by explaining what it's going to turn out like, first get her to engage in eye contact "So I know you're listening".
THEN carry out the action, step by step. If she's mixing or icing or cutting or sticking, she'll concentrate. Go to the other end of the room, say her name and ask her to stop a moment. See if she registers you are speaking. She'll want to get stuck in but has to pay you heed.
Does DD seem to be "in her own little world' occasionally, does she come if you call her but not if you are out of sight? Can she carry a tune, do you ever turn music or tv down because she's been listening to it at a louder level on her own than anyone else?
Sometimes without realising, parents and siblings compensate for loss or reduction of hearing. DD will have been happy enough but the teacher's picked up on it amidst the hubbub of school life. Nothing to say it is a permanent problem.