Upvote:1
UK Immigration Rules do not specify a minimum validity period for residence permits. The eligibility requirement is to be able to show ties to your country of residence that demonstrate you have a compelling reason to leave at the end of your planned visit eg job, family, savings.
So yes, you can apply.
https://www.gov.uk/guidance/immigration-rules/immigration-rules-appendix-v-visitor-rules