Can you extend electrical wires from a junction box as long as the splices are contained?
I would use a surface raceway setup for this
This sort of job (extending power along a wall or ceiling) is precisely what surface raceway (such as Wiremold™) is made for.  In Wiremold 500/700 series (Legrand's baseline metallic product), you'd be using a V5737 box with a blank cover (a standard 4&quot; round junction box cover painted to match the raceway/ceiling will work, or you can order in a V5736 cover if you don't want to do any painting) as your starter, then appropriate lengths of raceway (including what sounds like a flat elbow) to connect the starting point to a V5738AF fan box, which you can then hang your chandelier from.  Within this raceway, you then run THHN wires (black/white/green 12AWG stranded serves as a &quot;universal donor&quot; here) from the existing box connections to power the new fixture.