The current user should have the "Project - Edit" permission enabled in the project:
Once the above requirement is fulfilled, the Portfolio field becomes editable:
In case if the above permission is enabled, but some portfolios are not shown in the drop-down list, then current user is not included to such portfolios.
The solution is to include the user to the portfolios or enable the "Manage all portfolios" permission in the user's global access level.
The solution is to include the user to the portfolios or enable the "Manage all portfolios" permission in the user's global access level.