I'm scheduled to travel in the first week of July, and I found out that my passport expires on 03 August 2012. I've got a Canadian passport and UK work permit.
Will I be able to travel without a problem in my return in London?
I see three possible questions here: Can I get into the UK without a lot of time on my passport, can I get home without a lot of time on my passport, and (if you're staying past August) can I get home on an expired passport?
The middle one is the easiest. There's no need to have room left on your passport when you're coming home. In general you can come home to Canada even with an expired passport. The tricky part might be if the airline decided that your expired passport didn't constitute valid id and didn't let you on the plane. So that's the risk for the last question. If you're going to be in the UK for 6 months or more, you should take all your birth certificate and whatnot with you and then renew your passport while you're in the UK.
The hardest is the getting in to the UK. Many countries require you to have 6 months left on your passport. (I did a small search and couldn't find whether the UK is one or not; you should contact whatever agency issued your work permit and find out for sure.) What I would do in your shoes is renew your passport now. Regular speed is 4 weeks (they say; mine took 2) but rush can be as little as a day for an extra fee. That way you don't need to worry that random airline clerks will turn you away because they think they know a rule.
A lot of airlines and countries will not let you in or onboard if your passport has less than six months left on it. I wouldn't take the risk.
Get your passport renewed now. Information on how to do this is online. Get it done fast.
Don't worry that your work permit is in your old passport. You'll get to keep both, and when you get to the UK, you show them first your new passport as ID, and then your old expired passport with the permit. Yes, it sounds crazy, but I did this for over a year and they don't even bad an eye - it's so common among expats. You can get it transferred over, but it costs 200 pounds, so why bother...
If you look at the processing times for Canadian passports, it's possible to get it done in anywhere from 20 business days, to same hour service if you're really desperate, all for a fee, of course. Choose whichever one you feel comfortable with.