There is overlap between the two terms. Legally it is not relevant which the service dog does, so long as he does one or the other or some of both. A service dog's legitimacy is not determined based on whether he does one or the other or both. It's a little puzzling why we get so many requests for an explanation of the differences between the two when the differences aren't what matters.
First, what they have in common:
1. must be individually trained (not natural behaviors of dogs such as needing to be walked or turning their head when they hear a sound, emotional support, or companionship)
2. must mitigate the person's disability (ie be something the person's disability prevents or substantially limits them from being able to do for themselves)
A task is an individual, discrete (a complete stand alone unit), specific thing that needs doing. It has one cue and one result. It might be a simple behavior or a complex one with multiple steps, but there is always a single objective. Examples of tasks include: opening doors, picking up dropped items, and notifying the handler of the sound of the doorbell.
Work is a broader term that may include any of the following:
1. a group of related tasks (such as hearing work consisting of signalling for several different individual sounds with a different response for each sound)
2. a trained behavior that has a decision tree where the outcome is not always the same but requires the dog to evaluate different options and choose the correct one (such as guiding around obstacles)
Here are some examples from the human world to demonstrate the differences:
Housekeeping tasks include: doing the dishes, taking out the trash, washing the windows, doing the laundry, doing the dusting, cleaning the toilet. When you take all of these tasks together or some random assortment from the list, you call them "housework." The term "housework" is more broad than "house keeping tasks," but they're both still about the same thing which is cleaning the house.
Secretarial tasks include: filing, answering the phone, typing, making appointments for clients, sending out billing statements. Secretarial work is some combination of the above. It describes generally what a secretary does during the day without listing off what that secretary did on that one specific day in detail.
Notice the item "making appointments for clients?" Depending how that is executed and viewed by the person making the appointments, you could make a case that it is a task with a single result (an appointment is made) or that it is work because it involves a decision tree (when the appointment is made is going to depend on several different factors unique to each appointment that is made). That's because there is no concrete, black and white, hard line between the two terms. They are similar and they overlap. And that's why it makes very little sense to try to determine whether an individual service dog does work or does tasks. The vast majority probably do some of each along a spectrum that has guide dogs doing work nearer one end and wheelchair dogs doing tasks nearer the other.