I'm about to attempt the same DIY during the winter break. Only I'm ordering my mirrors directly from the UK, and I'm ordering stock OEM power folding mirrors, ECU and the stock OEM switch (about $500 USD for everything)
There is indeed a Power Folding Mirror module that you would need that is usually mounted behind the glovebox;
BMW E46 3 series / Mini folding wing mirror ECU.
GENUINE BMW O.E.M. part.
BMW Part Number; 61.35-8 376 506 -
This is mounted behind glovebox.
I'm sure if your folding mirrors are OEM then your extra ribbon may need to journey to this ECU box in order to get the folding thing to work.
But if you are using aftermarket power folding mirrors, then the OEM ECU would not work for you.
Going from what I read about the famous JDM power folding mirrors that ricers put onto accords, aftermarket mirrors only need a fuse, a toggle style switch and two wires in completeing the circuit between the fuse, switch and motor. The switch is usually like a spring button/toggle switch where you flip the switch either way and it flips back to the original position after the circuit closes for a moment and a pulse goes thru the circuit and starts the motor to turn once in one direction.
When you flip it again the circuit closes again for a moment and the motors turn the opposite way.
That is a laymans explanation of how the motor on the mirrors work on a simple aftermarket circuit. You can get fancy and wire the circuit to other things and modules in the car so you can control the switch via a remote keyfob or what have you. I heard of someone splicing the power folding mirror wire to the alarm blinker lights wires that are already wired to the car's alarm/remote key fob.
That said, those are Hondas and Acuras that use the JDMs and simple circuitry. With BMWs I'm not sure what extra stuff you would need.
Also in terms of the OEM Mirror Switch there is a severe visual difference in the pin input between the power folding and non power folding as you can see in the picture below;
here on the UK originated Power Folding Switch the back is purple and the pin input is I think 6. This simple pin input of 6 further supports that another unit, most likely the ECU behind the glovebox, imust be needed to make the folding motor work.
On the UK originated non-folding switch the back in turquiose and the pin input is 12 or some other number depending on if you have memory. So it may be impossible to connect folding mirrors to a non folding mirror switch; vice versa.