Yes, if you applied for a work permit extension before your work permit expired, you can keep working until a decision is made on your application.
You must stay in Canada and meet the conditions of your original work permit. For instance, if you have an employer-specific work permit, you must still work for the employer named on that permit.