Anyone knows how to check in apex if the user has access to the 'OwnerId' field of any selected object. The user could be any and not only a logged-in user.
You should query on UserFieldAccess
Obtain the Id of the user regardless if he is logged-in or not. Obtain the DurableId first
SELECT Durableid FROM UserFieldAccess WHERE FieldDefinition.EntityDefinition.QualifiedApiName='Account' AND FieldDefinition.QualifiedApiName='Name' AND User.Id='<userId for the user you want to check field access for>'
Use the unique DurableId returned above to query UserFieldAccess.
SELECT DurableId,EntityDefinitionId,FieldDefinitionId,Id,IsAccessible,IsCreatable,IsUpdatable,UserId FROM UserFieldAccess WHERE DurableId = '<DurableId returned in query 1>'
Replace Account Name with OwnerId or any other field that you want to check the access for