Yes - lucid dreaming can be learned. There are many sleep/dream studies on this.
Pulling from my little archive: https://www.newyorker.com/magazine/2025/01/27/what-an-insomniac-knows
On the farther shore of sleep, Jandial writes encouragingly of the willed practice of lucid dreamingthat is, of shaping our minds so that our dreams are not merely orderly but intentionally helpful. We focus on seeing the divine, and were told that some version of the divine will be seen that night, though Hindus will see Krishna and Christians Christ. The practice of lucid dreamingfor what its worth, it apparently can be aided by a drug called galantaminewould seem to clash with Jandials earlier theory of useful randomness in dreaming, but then why should dreams be any more subject to a unitary principle than any other part of life? This particular non-lucid dreamer made an effort, after reading Jandial, to dream the divine, but I kept getting instead the missed exam and the extra room in the apartmentperhaps evidence that dreams will elude the strictures of lucidity, or perhaps evidence only that, for a New Yorker, the extra room is the image of the divine.
I've always had vivid dreams that I can remember for days/years later. More recently (in my last half of life) I can be half asleep and half awake and gently watch and influence where my dreams are.