https://www.gov.uk/apply-home-office-travel-document
Overview
You can apply for a document to travel outside the UK if:
you are not British
you cannot use or get a passport from your country’s national authorities
your country’s national authorities cannot give you a new passport
Eligibility
To apply you must be living in the UK because of one of the following:
you have permission to stay as a refugee or stateless person
you have humanitarian protection and it has been officially accepted that you have a fear of your country’s national authorities
you have permission to stay (known as ‘leave to remain’) or are settled in the UK (known as ‘indefinite leave to remain’), but you cannot get a passport or travel document from your country’s national authorities
You must be in the UK when you apply.
The above states you can but you have to try and apply for it and explain your circumstances.
My opinions should not be constituted as an immigration or legal advice.