First notice that all the dwarfs must be all odd ages or even ages. If a dwarf of one age stays home the ages of the remaining dwarfs must add to an even number (as the must be able to form to groups of equal sum of ages). This is true when you replace the dwarf with any other dwarf so any two dwarf's age must be the same parity.
Notice that if a,b,c ... z is a solution, so is ka,kb, kc,... kz and vice versa. So if all the ages are even we may divide all ages by the lowest common power of two divisor to get a solution with an odd number and hence all the numbers will be odd. So without loss of generality we'll assume the solution has only odd number and furthermore that there is no mutual common divisor greater than one.
Let n = the number of dwarfs to n-1 is the number of dwarfs that work. The sum of n-1 odd ages must be an even number so n -1 must be even so n is odd.
n = 1 is a trivial answer. One dwarf stays home. Two teams of zero go to work. This is an answer but clearly not an acceptable one.
n=3 doesn't work. If one dwarf stays home the other two dwarfs form two teams whose sum of ages are equal. Either the two dwarfs are equal age which is a contradiction, or the two dwarfs are a team whose ages sum to 0 which is absurd.
n = 7 does work. Let the ages be 1,3,5,7,9,11,13. Then 13+11 = 3+5+7+9; 13+9+1=5+7+11; 13+9=1+3+7+11; 13+5+3=1+9+11; 13+7=1+3+5+11; 13+5+1=3+7+9;11+7=1+3+5+9.
Have to show n= 5 does not work. Consider a < b < c < d < e. You'll see it doesn't work. But I'll get back to it in a few hours.
If a stays home the there are $2^4 =16$ possible subsets of {b,c,d,e} and $16/2$ subset-complement pairs. Obviously {b,c,d,e}{} isn't a valid pair. Nor is any {x,y,e}{z} as x+y+e > e > z. So that leaves only four possible pairs. {b,c,d}{e} with b+c+d =e is a possibility {b,c}{d,e} isn't as b + c < d + e. {b,d}{c,e} isn't as b
So the two possibilities if a stays home are i) b+c+d=e or ii) b+e = c+d.
Likewise the two possibilities if b stays home are a) a+c+d = e or b) a+e = c +d.
But these are incompatible with i) and ii) above. a + c + d < b + c + d so they can't both be equal to e. a+c+d > c+d and e < b+e so c + c + d can't equal b if b+ e = c+ d. Likewise a < b so a+e and b+e can't both equal c+d. c+d < b+c+d so we can't have b + e = c+d < b+c+d = e.
So n=5 is impossible.