"He looked as if he wanted to do the work by himself" is just fine, but removing "he wanted" makes it very unnatural, partially because the resulting sentence has two conflicting tenses in it. "He looked like he wanted to do the work [by] himself," or "it seemed like/as if he wanted to do the work on his own" would also be acceptable
If you amend your second example to say "he looked as if he did the work by himself," it'll infer that the work is already done, and he is either proud of his accomplishment, or upset that he has to share his glory. You could also say "it looked/seemed as if he did the work by himself." By changing the subject, it changes the meaning as if the person speaking is not observing the man, but rather, the situation in which he worked, or perhaps the final product itself.