You should talk to your course tutor as to the reasons you failed. You said it was an exam, so I would go on to rectify whatever weakness was identified. Presumably youve checked to see if there is an appeal procedure and whther you have reasons such as mitigating circumstances.
Obviously full disclosure is needed otherwise it will be taken very seriiously of/ when you reapply. On the basis it will come out/ has to come out, then you need to be able to persuade them you have deal with the weakness imo.
It seems different nursing schools have different policies on reapplication, so its possible to reapply, but I would make enquiries to the school concerned, what their policy was, so you know in advance. There is no reason for you to disclose your name.
If you are a member of the RCN then they have a helpline where they can advise. .