Hi @SaanaL , welcome to Q&A forum!
Per my test in my end, if users are using OOTB library, even if users only have permissions for some folders, they can still directly edit the file permissions for which they have permissions.
And if you are using a power apps form, per my understanding it's a behavior by default:
User with full control with all the folders:
User with Edit permission on some folders:
A similar post:
"It looks like you don't have access to this app. Ask its owner to share it with you" error
If the answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.