I had the same issue after upgrading from 7.2.2 to 9.3.2. Our issue was we were setting user roles through the DNN API and in DNN 7 the persona bar didn't exist yet or wasn't managed the same as it is in DNN 9.
We weren't assigning the Registered Users role to users in DNN 7 because it didn't matter for us. When it wasn't set in DNN 9 then some of our admins lost the edit pencil.
The Registered Users role (Role ID 1) is in the dbo.PersonaBarMenuDefaultPermissions and dbo.PersonaBarMenuPermission tables, which grant that role permission to the persona bar menu areas that are likely to be missing if you have this issue (Content, Pages, and Edit).
As soon as we added the Registered Users role to our users, then their edit pencil was restored.