OK I think I understand a bit more of what you mean.
If you put a 4K image into a 4K sequence and scale (zoom) that image up (let's use 200% as the amount of the scaling) then yes, you have lost image quality. In fact in this case, what you have is now is (*almost) exactly HD (1920x1080) quality within a 4K sequence. If you export that image and watch it on a 4K monitor it will appear (visually) as HD quality. IF you watch this 4K clip on an HD monitor you'll see it in approx HD quality ... because the clip had become approx HD resolution in a 4K sequence.
Now if you start with an HD sequence and drop a 4K image into it and the 4K image fills the frame - yes it will be HD resolution because in an HD sequence can only show 1920x1080 pixels so it averages all the pixels from your 4K image into HD resolution .... BUT you can scale this image up to 200% (while editing) before you will lose any quality at HD resolution. Once you pass 200% the quality of the image will degrade and now be less than HD quality (in the HD sequence) because you have 'zoomed' in beyond the area within the 4K image that contains 1920x1080 pixels.
To directly answer your question: if you put a 4K image into an HD Sequence you can never have more than HD resolution in the exported video, even if you export it in 4K. Rule of thumb - always export at the native resolution of your sequence. You can export at a smaller resolution and get the video at whatever resolution you choose (say 1280x720) but never export at a higher resolution than your sequence - it's a waste of space and gets you no benefit.
The advantages of working with 4K in an HD sequence is that (up to 200%) you can scale the image and reframe the shot as much as you like and still get HD quality exports. Doing this (say) with an interview is something we do all the time. With one (4K) shot we can have a wide and a tight framing of the subject from the one camera.
Side note: ensure when 4K clips are in an HD sequence that you use 'set to frame size' rather than 'Scale to frame size' (you find this in a drop down menu if you right click a clip in your sequence) ... and while I've been talking about 200% scaling - once a 4K clip in an HD sequence is 'set to frame size' you'll notice that in the 'Effects Controls' panel the clips 'scale' will appear as '50' (this is a percentage) when you have your 4K clip filling the HD frame ... and you can safely take the scale of this clip up to 100 (%) and lose NO quality in the HD sequence.
* pixel averaging will occur at different scale settings and image positions reducing actual resolution slightly.