Assuming steady-state linear flight and the other constraints stated in the question--
The idea that a component of the Lift vector is helping to pull the glider forward along the glider's trajectory as viewed from the ground is only true when the glider's achieved glide ratio relative to the ground is better than the L/D ratio (which is also the still-air glide ratio), or when the glider is climbing in an updraft (unless the glider is drifting backwards over the ground along an achieved climb path that is flatter than the direction of the drag vector/ relative wind). These are the only times the that the Lift vector has a forward component relative to the glider's trajectory as viewed from the ground.
This would only happen in one the following cases -- the glider must be flying in:
1) Air that is neither rising or sinking, but is moving with tailwind component relative to the glider's actual heading (not relative to the "course" or achieved ground track-- the distinction comes into play when there is a strong crosswind component.)
2) Air that has no horizontal motion, but is rising.
3) Air that is rising fast enough to offset the degradation in achieved glide ratio caused by a headwind component.
4) Air that is moving with a tailwind component that is strong enough to offset the degradation in achieved glide ratio caused by a sinking (downdraft) component.
5) Air that is rising and also is moving with a tailwind component
To a first approximation, the idea that a component of the Drag vector is helping to pull the glider along the glider's trajectory as viewed from the ground is only true when the glider is moving backwards over the ground-- i.e. when a component of its "course" or achieved ground track vector points in the same direction that the tail of the glider is pointing, and opposite the direction that the nose is pointing. This can easily happen in strong wind-- the glider can easily drift backwards over the ground.
Strictly speaking this approximation is only true if the L/D ratio is infinite. To be more precise, we have to recognize that the true criteria is that the Drag vector will help pull the glider along the glider's trajectory as viewed from the ground whenever a component of the actual three-dimensional flight path as viewed from the ground-- not just the "course" vector or achieved ground track-- points in the same direction that the Drag vector is pointing. Since the Drag vector is parallel to the flight path through the airmass or "relative wind", it is inclined relative to the horizon. Therefore for non-infinite glide ratios this criteria can be achieved when the aircraft is rising straight up vertically relative to the ground with zero horizontal groundspeed in a strong updraft, or even when the aircraft is creeping forward very slowly over the ground as it rises rapidly upwards. Also, there can be cases where the criteria is not met even if the aircraft is drifting backwards very slowly over the ground, if it is also sinking very rapidly due to a strong downdraft. But for reasonably high glide ratios, it's a fairly good approximation to say that the Drag vector is helping pull the aircraft along its trajectory as viewed from the ground only when the aircraft is actually drifting backwards over the ground.
What is really going on here is that we have a closed vector triangle of Lift, Drag, and Weight, with Lift smaller than Weight and inclined slightly forward relative to weight. Drag is perpendicular to Lift and acting at right angles to Lift, as illustrated in this related answer. There is no question that net force is zero, and net acceleration is zero, from any inertial reference frame, including the airmass reference frame and the ground reference frame. But the velocity vector is different in different reference frames-- for example consider the case where the glider is slowly rising straight up as seen from the ground reference frame-- so the issue of which forces are contributing a component along the glider's direction of travel depends on which reference frame we choose.
Note that it is often said that gliders are powered by gravity. This is always true as seen from the airmass reference frame-- of the three forces Lift, Drag, and Weight, Weight is the only one with any component parallel to the glider's path of travel through the airmass. But as seen from the ground-- i.e. in relation to the path of travel relative to the ground-- gravity is exerting a force component parallel to the trajectory only in cases where the glider is losing altitude. If the glider is climbing, then the Weight vector is exerting a force component against the direction of glider's trajectory as seen from the ground, not in the same direction as the glider's trajectory as seen from the ground. If the glider is flying horizontally, then from the viewpoint of the ground-based reference frame, the Weight vector is exerting no force component along the direction of the glider's trajectory, and is doing no work on the glider.
This means that whenever a glider's velocity vector as seen from the ground is constant and is purely horizontal, the forces exerted along the direction of travel by the Lift and Drag vectors must be exactly equal and opposite. Whenever a glider is travelling horizontally and the glider's velocity vector as seen from the ground has a component toward the nose of the glider rather than toward the tail of the glider, the Lift vector is helping to pull the glider along its path of travel, and the Drag vector is resisting that pull in a way that exactly cancels it out. Conversely, if the glider is travelling horizontally and backwards as seen from the ground, then Drag vector is helping to pull the glider along its path of travel, and the Lift vector is resisting that pull in a way that exactly cancels it out.
The Lift and Drag vectors are fixed in their geometric relationship to the relative wind-- Lift is perpendicular to the relative wind, and Drag is parallel to the relative wind. Furthermore, for any given L/D ratio and Weight value, the Lift and Drag vectors are fixed in magnitude. The fact that, from the ground reference frame, the force component exerted in the glider's direction of travel by the Lift and Drag vectors varies according to the wind direction and updraft or downdraft velocity, is really just an artifact of the fact that direction of the relative wind is not fixed in relationship to the direction, and magnitude, of the glider's velocity vector as seen from the ground.
The work done by a force is defined as distance traveled times the force component exerted in the direction of travel, and it takes energy to do work on a glider or any other body. It doesn't really make sense to ask what energy source is responsible for any one particular aerodynamic force component, such as the component of the Lift or Drag vector that is acting parallel to the flight path as viewed from the ground. Ultimately, as seen from the ground, any NET energy transferred from the atmosphere to the glider, via the combined action of the Lift and Drag vectors, can only come from updrafts. Only in the presence of an updraft can a glider gain altitude while flying at a constant velocity, regardless of the horizontal wind speed and direction. Of course, as the glider extracts Kinetic Energy from the updraft and converts it into its own gravitational Potential Energy, the updraft must be slowed by an infinitesimal degree. The only instance where the glider is neither increasing nor decreasing the Kinetic Energy of the surrounding local airmass is when the glider is travelling purely horizontally, rather than sinking or climbing.
And the ultimate energy source that powers updrafts-- whether they are thermal updrafts or "ridge lift" updrafts or mountain wave-- is the sun. This power may be conferred either via direct solar heating of the ground directly below, or by complex meteorological processes involving the entire global weather system.
The question also asked about powered aircraft.
Assume for simplicity that Thrust acts exactly opposite in direction to Drag.
In the case where Thrust is less than Drag, the aircraft is exactly like a glider, except we substitute "(Drag minus Thrust)" wherever "Thrust" appears in the explanation.
In the case where the Thrust and Drag are equal, the explanation regarding the Drag vector is exactly the same as the "first approximation" explanation (assuming infinite L/D ratio) above. And in this case, the Lift vector is adding helping to pull the aircraft forward along its trajectory relative to the ground anytime the aircraft is in rising air, without exception, and without regard to headwind or tailwind.
In the case where Thrust is greater than Drag, then the idea that a component of the Lift vector is helping to pull the aircraft forward along the aircraft's trajectory as viewed from the ground is only true when the aircraft's achieved climb ratio relative to the ground is better (i.e. a lower number than) than the L/(T-D) ratio. This will require an updraft, or a headwind, or both, and a weak updraft may not be enough to offset a strong headwind, and a weak headwind may not be enough to offset a strong downdraft.
In the case where Thrust is greater than Drag, then the idea that the Drag vector will help to pull the aircraft along the aircraft's trajectory as viewed from the ground can only be true when the aircraft's trajectory as viewed from the ground has a component pointing in the same direction as the drag vector. For ratios of L/(T-D) that are not too high (i.e. the still-air climb angle is not extremely good), to a first approximation this means that the aircraft is drifting backwards over the ground, but this approximation will not apply well to extremely high still-air climb angles. An aircraft that could climb straight up at a high rate of climb in still air could, in that same configuration, only move (as seen from the ground) in the direction of the Drag vector in the presence of an incredibly strong downdraft.