We've always had a real tree and it's in a carpeted room with a wood-burning stove.
We get a locally-grown Nordmann fir or Fraser fir, they needle-drop a lot less than the spruces (and the needles are flatter and softer, less painful).
Sit yourself on the front doorstep whilst you saw a bit off the bottom (also a good opportunity to take off any wonky lower branches to zhuzz it up in a nice symmetrical way and ensure it'll fit better in the stand), then take it indoors and keep it well-watered in this sort of stand:
www.amazon.co.uk/Cinco-Advantage-Stand-Trees-Meters/?tag=mumsnetforu03-21
If you're careful when you water, your carpet should be safe. I use an empty wine bottle for this because it has a nice long neck so I can reach the stand.
IME, they drop needles like mad when you first bring them in and set them up and while being decorated. It's the shock, I think.
So you do all the positioning, installing in the stand, watering, unwrapping, let it relax a bit. Then get on with hanging lights and baubles. Then admire your work, but ignore the epidemic of needles all over your carpet - more will probably fall overnight.
Next morning, Hoover up the needles. Don't use the flat carpet attachment, the needles get stuck in the roller. Use the naked hose.