The ability to lock files in a repository is restricted to users Developer level access to the project and Administrators.
If a user has “Guest” or “Reporter” level access to the repository/project, I’d expect that the “Lock” button would appear grayed-out with the following message on hover:
If I understand correctly, you’re not seeing the “Lock” button at all. Is this correct? In that situation, it seems likely that you have not been added as a member of that project/repo.
In any case, having a project maintainer or GitLab admin to add you as a project member with developer or maintainer permissions should enable the ability to Lock files as described in the docs.