How do I determine which molecule of each pair has the largest dipole moment?

case one: CO and NO

case two: SF4 and CF4

I have to use their electronegativities, right?

For linear molecules, such as CO and NO, yes, use electronegativity.
For non-linear molecules, such as SF4 and CF4, EN PLUS shape. Sometimes the shape cancels the individual internal dipoles.

How do I determine if they cancel or not?

Determine the shape of SF4 and CF4. CF4, for rexample, is tetrahedral (therefore, symmetrical). Each C and F has an EN such that you would expect each C-F bond to be polar (and it is) but four C-F bonds in a tetrahedral arrangement is symmetrical and the molecule as a whole has no dipole moment. So you know the answer now for CF4.