Okay so I'm not sure I'll make sense, I'm certainly not defending the stand here - but I would almost pass that slip off as in character for Nidhi. Clearly her history has a sweet sour chord with the mother daughter bond - and maybe this was more of ... you know, like an excited spill of detail than a solemnly made thoughtful statement. I think the whole idea of a mother daughter bond is this mystical special thing to her - and she probably just jumped the gun and told him how a daughter was saving mother...! Its something her character is quite capable of - such verbal and casual negligence in her excitement!
I did think of it as a slip off but still the law is the law. The consequences of this slip off could have been extremely bad. A doctor can't really claim it was just a slip off if they end up in prison for revealing the sex of the baby before being born. So yes for me it was not just a slip off it was pathetic that the writers/producer do not remember this law. I found it extremely funny that rajan shahi had a couple of episodes of yeh rishta kya kehlata hai dedicated to this law but when it came to KTLK he forgot about it completely. Lets see if the writes do something with it or not.