I don't know if I understood correctly, but you could instead make a selection, trace the path and then do Edit - Stroke path.
Result: the yellow line in the image.
Or fill the entire selection (green color) and then remove the center of that selection.
Result: the yellow line in the image.
Or fill the entire selection (green color) and then remove the center of that selection.