She might have been suffering from amnesia.
Amnesia means memory loss. This loss can be sudden and occur due to an accident or psychological trauma or it can develop over a long period of time. Sometimes there is no logical explanation for amnesia. Amnesia can be temporary and disappear on its own, or it can be permanent. In same cases of amnesia, people remember facts from distant past but they are unable to remember their proper name or the place where they live.
The woman in question would be fingerprinted for identification and later referred to a local hospital or health centre for treatment. As she is confused she would be probably kept under custody in a special facility till an identification is made.