Of course, it's possible, a Kardashev type II civilization will have it quite easy.
This is a healthy star, like our:
And this is a super healthy star (even when scientists says it's a failed star!):
Our objective is the second image. Now, let me explain everything.
How is a normal star
Normal stars, like our star or the star from the first image, have their elements divided into layers. Our sun is like the first image, but with fewer layers (2 main layers: 74% Hydrogen and other from 25% Helium, the 1% is scattered around the photosphere), since it's less massive and younger.
A young star only has hydrogen in its core but, after some time, helium reserves will be build from the hydrogen, and so they will stay in the core (displacing the hydrogen) due to their increased weight. This new helium will replace the main-hydrogen-fusion and create new elements that will perform the same cycle.
Our star is quite young, so the main-fusion is made from hydrogen -even when the core has 60% of helium- due the Sun doesn't have enough temperature to fuse helium yet. The problem is that when helium raise in the core, all the hydrogen (not burned) will be displaced from it to the outer layer, and because the Sun can't fuse helium, gravity will reduce its size, massively increasing the pressure of the core, causing nuclear fusion of helium that will counter-act the new pressure.
So... what is wrong or bad from that? Well, that all the non-used hydrogen is just discarded. That precious fuel won't ever be used by the Sun, instead will accumulate in the outer layer of it. So, how can fix that? That happens because the Sun transfer all its heat in form of radiation, so the solution is:
Basically, convection is this:
Convection is the heat transfer due to the bulk movement of molecules within fluids such as gases and liquids [...].
An example would be when you boil water in the oven, the water from the bottom becomes hotter and move to the top, forcing colder water to move to the bottom. This is characterized by a mass transfer between the hotter zone to the colder one. And that is great!
If the molecules of the sun are forced to move by convection all the "layers" of elements get broken, that means that heavier elements won't be moved to the core nor lighter elements (hydrogen and helium) will be moved outside it. It will be a homogenous mix! And we need that, so the Sun will be able to fuse all their hydrogen before start fusing heavier ones (like helium). Now the problem is: How to archive convection?
Building a convective star - Mass and Size
From Wikipedia:
Convection is the dominant mode of energy transport when the temperature gradient is steep enough so that a given parcel of gas within the star will continue to rise if it rises slightly via an adiabatic process. In this case, the rising parcel is buoyant and continues to rise if it is warmer than the surrounding gas; if the rising particle is cooler than the surrounding gas, it will fall back to its original height. In regions with a low-temperature gradient and a low enough opacity to allow energy transport via radiation, radiation is the dominant mode of energy transport.
Now, I'll summarize the following paragraph from that link into 4 items.
Basically, the mass of the star determines the type of thermal conduction due to its fusion:
- Well, the first is special. White Dwarf don't fuse, so they don't produce heat, their only transfer its remaining heat using thermal conduction. We will only use this after the star dies, in order to maintain it warm for more time.
- Medium stars (0.3 - 1.5 M☉), like our Sun, primary fuse hydrogen-to-helium using the proton-proton chain which doesn't produce enough steep temperature gradient (only 4th power). Thus, convection isn't possible and so radiation is used in the core. The outer portion is enough cold to allow convection.
- Massive start (> 1.5 M☉) has cores with greater temperatures, which allows the CNO cycle to produce hydrogen-to-helium fusion. This cycle has temperature rates of 15th power, enough steep gradient to make convection effective. The outer portion of the star doesn't have steep gradients due being colder, which force them to use radiation.
- Small stars (< 0.3 M☉) have no radiation zone; the dominant energy transport mechanism throughout the star is convection.
Black arrows are convection and red arrows radiation.
Massive stars are difficult to make and since there are bigger they consume more fuel (even using convection), so smaller stars are the best: we need a red dwarf.
Red Dwarf - The economical star
From Wikipedia:
A red dwarf (or M dwarf) is a small and cool star on the main sequence, of M spectral type. Red dwarfs range in mass from about 0.075 to about 0.50 solar mass and have a surface temperature of less than 4,000 K. Sometimes K-type main-sequence stars, with masses between 0.50-0.8 solar mass, are also included.
[...]
Stellar models indicate that red dwarfs less than 0.35 M☉ are fully convective. Hence the helium produced by the thermonuclear fusion of hydrogen is constantly remixed throughout the star, avoiding helium buildup at the core, thereby prolonging the period of fusion. Red dwarfs, therefore,develop very slowly, maintaining a constant luminosity and spectral type for trillions of years, until their fuel is depleted. Because of the comparatively short age of the universe, no red dwarfs exist at advanced stages of evolution.
Emphasis mine.
Red dwarfs are really small and so they consume a lot less of fuel and remix it constantly avoiding wasted hydrogen. Note that red dwarf produces much less heat and light, so you must (a) bring the planets close to the star (and avoid the possible tidal lock or gravitational squeezing) or (b) produce your own artificial light for those habitable planets.
But, how we make a red dwarf?
Operating a star: Making a Red Dwarf
Make a red dwarf is really simple, you just need to remove mass from it. Well, that is extremely difficult but for a type 2 civilization and with a green light for unobtanium use you may do that in just a blink of eyes.
Once you finish to remove the unnecessary mass, be sure to keep it in a safe place, free of nuclear fusion (or a new star will be made). After that, you should be constantly checking your star, feeding with more hydrogen when it needs, and removing the heavier elements that disturb the convection (a so reduce its luminosity).
After running out with all your fuel reserves, start feeding it with Jupiter, Saturn and the other gas planets from the solar system. After that, I'm sorry but we will have to accept its death... or not.
Maintaining the undead: Blue Dwarf
Blue dwarf
From Wikipedia
A blue dwarf is a predicted class of star that develops from a red dwarf after it has exhausted much of its hydrogen fuel supply. Because red dwarfs fuse their hydrogen slowly and are fully convective (allowing their entire hydrogen supply to be fused, instead of merely that in the core), the Universe is currently not old enough for any blue dwarfs to have formed yet, but their future existence is predicted based on theoretical models.
Stars increase in luminosity as they age and a more luminous star needs to radiate energy more quickly to maintain equilibrium. Stars larger than red dwarfs do this by increasing their size and becoming red giants with larger surface areas. Rather than expanding, however, red dwarfs with less than 0.25 solar masses are predicted to increase their radiative rate by increasing their surface temperatures and becoming "bluer". This is because the surface layers of red dwarfs do not become significantly more opaque with increasing temperature.
Your red dwarf will become blue. Also, the increase in heat will allow you to fuse heavier elements like helium, carbon an so on. You may start feeding it with all that heavier elements (but never with iron or heavier, they consume energy instead of produce on fusion). Be careful to not overfeed it and produce a giant star or worse and go supernova.
But finally, it will perish.
The holy corpse: White Dwarf
If your civilization still wants to extend its lifespan you should consider making a new religion for it... anyway white dwarf is dead so they don't fuse.
A white dwarf, also called a degenerate dwarf, is a stellar core remnant composed mostly of electron-degenerate matter. A white dwarf is very dense: its mass is comparable to that of the Sun, while its volume is comparable to that of Earth. A white dwarf's faint luminosity comes from the emission of stored thermal energy; no fusion takes place in a white dwarf wherein mass is converted to energy.
Emphasis mine.
Be careful about its size because:
The material in a white dwarf no longer undergoes fusion reactions, so the star has no source of energy. As a result, it cannot support itself by the heat generated by fusion against gravitational collapse, but is supported only by electron degeneracy pressure, causing it to be extremely dense. The physics of degeneracy yields a maximum mass for a non-rotating white dwarf, the Chandrasekhar limit —approximately 1.44 times of M☉—beyond which it cannot be supported by electron degeneracy pressure. A carbon-oxygen white dwarf that approaches this mass limit, typically by mass transfer from a companion star, may explode as a type Ia supernova via a process known as carbon detonation [...]
Emphasis mine.
But don't worry, they last a lot of time also (as red dwarf):
A white dwarf is very hot when it forms, but because it has no source of energy, it will gradually radiate its energy and cool. This means that its radiation, which initially has a high color temperature, will lessen and redden with time. Over a very long time, a white dwarf will cool and its material will begin to crystallize, starting with the core. The star's low temperature means it will no longer emit significant heat or light, and it will become a cold black dwarf. [...] the length of time it takes for a white dwarf to reach this state is calculated to be longer than the current age of the universe (approximately 13.8 billion years) [...]
Emphasis mine.
Defying Death: Necromancy!
Now your sacred religion must perform a final ritual, an unholy ritual: necromancy. We can still bring alive the star, but it will not be cheap.
In this catalogue we have three rituals to perform. You may choose one of them... of all if you like, it is possible in the correct order!
First ritual: The Black God (Black Hole)
After the white dwarf becomes a black dwarf hence a truly dead star, increase massively it mass or pressure (preferably the second one) until the gravitational collapse or pressure is enough to make a black hole.
Once you have summoned your black god star feeding it with mass, the accretion disk will produce enough light to simulate a star.
Second ritual: The Army of Hundred of Demons (Tiny Black Holes)
In order to perform this ritual, you must make an extremely small black hole from a little portion of the black dwarf mass. In case you already have a black hole, you are ruined, you might split it extracting a tiny piece of it or use unobtanium to force the [Hawking radiation)(https://en.wikipedia.org/wiki/Hawking_radiation), which is sci-fi.
For being exactly, you need 962.5653 kilograms of a mass black hole to simulate the 384.6 yottawatts of energy produced per second by the Sun (calculated using this) and it will have a radius of 1.429267e-22 centimetres.
Note that this black hole will die after 7.497924e-8 seconds... so you need to feed (or replace) it quickly (if you replace be careful with the super explosion produced before banishing).
From Wikipedia
Hawking radiation reduces the mass and energy of black holes and is therefore also known as black hole evaporation. Because of this, black holes that do not gain mass through other means are expected to shrink and ultimately vanish. Micro black holes are predicted to be larger emitters of radiation than larger black holes and should shrink and dissipate faster
Basically, black holes produce virtual particles and anti-particles (not confuse with antimatter, this is completely different) in its surfaces. These particles are made from nothing but they annihilate themselves very quickly an so any physical law is broken. The interesting thing is that these particles can escape from the black hole and less massive black holes are easier to escape, so, when one of this two particles escape and the other don't, this "escaped particle" becomes "real" and in order to not break any physical law, the black hole is "obligated to pay the price (in mass and energy) of both particles), effectively reducing its mass and emitting light. If you are a physist, please don't criticize me, it's just a very basic explaining.
Last Ritual: The master of tunnels (Quantum tunnelling)
Have you heard about the fascinating Quatum tunnelling? Do you remember the Hawking radiation? Well, that was a type of quantum tunnelling.
It's difficult to explain because it is related to
Heisenber uncertainty principle.
Weird, right?
But imagine yourself, if you run at maximum speed to a wall, can you move through it? Well... yes, I mean, NO! Don't try it!
Theoretically speaking you can but in real life you can't. If you want an explaining, in this answer I've already explained it
Using the most refined handwavium techniques with the most exquisite unobtanium, scientists are able to force this quantum effect (for being exactly proton tunnelling), effectively splitting heavier elements into lighter ones as hydrogen. So you are able to recycle wasted elements into precious fuel for your star!
A gift for you!
These are just fancy animated YouTube videos from Kurzgesagt – In a Nutshell that explain some interesting stuff in non-scientific language! And they're last less than 10 minutes!