The answer mainly depends on the culture of the organization. But, if there is a program management in place, then it's the program manager who will assign the project manager to a project, regardless of the size/culture/type of the organization.
Now if there is no program manager, then most likely it is a small company, and the project manager can be assigned directly by:
- The owner of the company OR
- The project sponsor OR
- He can be suggested by one of the executives
Note that the PMO is not responsible at all to assign the Project Manager, its role is restricted to monitor the work of the already assigned project managers.
In companies where PPM does the job of the PgM, then the Project Portfolio Manager is the one who assigns the project manager.