Disable rather than hiding edit button when a file cannot be edited
Problem to solve
Going to a repo where you don't have push access and merge requests are disabled, and then to a specific file in it, you can't edit and then propose a Merge Request directly. This is confusing.
Further details
The OP thought merge requests weren't supported, but they had just been disabled:
You have to go to the repo's main page, fork it, go to your fork, create a branch, edit and commit the file, go to the original repo and then create the Merge Request.
Proposal
Rather than hiding the Edit button, disable it and show a tooltip
Links / references
Edited by James Ramsay (ex-GitLab)