Maybe GSM will be along, but I have dealt with this situation, so will give you an idea (with the caveat that peoper legal advice may be necessary)
Legally, you are a family friend. Occasionally, in Social Services / Family Court situations, your relationship may be regarded as 'close'.
If your situation doesn't include these, then I believe you are clear - but depending on the exact nature of the document, you may wish to take legal advice.
If you have legal advice included in an insurance policy, or trade union membership, you can get advice easily & quickly.
I would add that this child is lucky to have an 'unofficial' gran to take an interest in them.