One path can't have two different strokes. When you did the difference operation, you ended up with one path. If you use Inkscape XML Editor Ctrl + Shift + X and examine the object, you'll see that it's one path.
To only have the stroke on the outside of the object, you'll need to have two path. There are two ways to do this.
Use a second path for the outer border
This technique has the advantage that it allows the how inside the gear to remain transparent.
- Change the object's stroke to none.
- Duplicate the object with Ctrl + D.
It might not be obvious, but you created a clone directly on top of the existing object.
- Use the Node editor F2 to delete the inner circle of the top path.
- Change the fill to none and the stroke to whatever you want.
Use a second path for the inner circle
This method has the disadvantage that the inner circle won't be transparent.
- Break the path apart with kbd>Ctrl + Shift + K.
This essentially undoes the difference operation you performed.
- Select the inner circle and change the stroke to none and the fill to white.