In standard English, as you know, "gotta" is notta correct. It's a slangy abbreviation for "got to" that is often used to denote casual or spoken English. In addition, "got + infinitive" is used after "has", so sentence B has a second error because there is an infinitive but no "has".
The correct form of sentence A in standard English would be as follows: She has got to have a lollipop in her mouth.
In non-standard English, however, both sentences might be used (or more likely heard). You might see or hear this type of usage in any of the following contexts:
- a novel
- a comic book
- a song
- a movie
I hope this helps.
By the way, why does she need a lollipop in her mouth? I'm intrigued.