Is it okay for a PhD student to devote substantial work time to projects the advisor is not involved in? For example, if he spends 20 hours a week on his advisor's project, and 20 hours a week on a project with another professor (that the advisor is not involved in).  Do most advisors find this acceptable, or do they see this as taking up work time that belongs to them?

And what if those 20 hours a week are spent on non-research activities, such as taking classes unrelated to the topic of the PhD, or a part-time job outside the university?
It really depends on the funding source.  

It is fairly common for researchers in industry to get a Ph.D. "on the side" as part time work away from their full-time job.  Many professors are OK with this because 1) an industry researcher often has more maturity in their approach to a subject than a student fresh out of undergrad, and 2) The professor is likely not required to provide funding for the student.  

A professor who is funding a student to work full time from their grants, however, will be rightfully angry if the student does not work full time for them.