Yes I think in Denmark you don't have to decide on a name before your child's born. So if they have their baby for only a few days, many Danish parents "check out" which name does fit the best to their baby. And after a few weeks (maybe even months?), they finally decide on a name and write it officially down. So on their first days on the world, not every Danish baby has a name.
When using "not" in English, it usually needs an "auxiliary" verb. When this auxiliary verb isn't included in the standard sentence, "do" is added and the main verb comes after the "not". So "She has a name" would become "She does not have a name", but an example with an auxiliary verb already in the standard sentence would be "She has got a name" which becomes "She has not got a name"
It sounds very odd to me.
- The girl has no name
- The girl has not got a name
- The girl does not have a name
are varieties that are close to your sentence and all sound more natural to me.
The problem may lie with "not a" which often turns into "no" (compare German, where "nicht ein" becomes "kein").
Your sentence works if you are contrasting: "The girl has not a name but a title" -- here, the "not" does not go with "has" but with "a name", i.e. "she has: not a name, but a title" rather than "she has not: a name".
It would be incorrect in Old English.
Old English is the language spoken in England from the mid 5th century AD until it developed into Middle English in the mid 12th.
"The girl hasn't a name" is correct and spontaneously used by speakers of Modern English today. Just not by people you know.
"Hedde" is a verb meaning "to be called", where "hedder" is the present tense form.
Jeg hedder Sean = I am called Sean.
"Navn" is a noun meaning "name".
Mit navn er Sean = My name is Sean.
Both "jeg hedder Sean" and "mit navn er Sean" have the same meaning. But in a sentence like "pigen har ikke et navn", you can't just replace "navn" with "hedde" without rewording the entire sentence.
A few days ago I read an article about Iceland. Parents there are only allowed to give their children correct original names. If you move there with a not language-compatible name, for example because it is containing a "C", you are called only 'girl' or 'boy' even on your passport. Well, those girls don't have a name...