Can I use foil as a wire for my project in tight spaces?
There are things called "Flat Flex Cables", and many variations of those, that are basically the "non-Ghetto" version of what you are talking about.  These are also related to "flexible circuits", which are part cable, part PCB.   Essentially they are all custom flexible circuits that many people use as cables for tight spaces.  

Here is a picture of an older iPhone where these cables are clearly visible (in a sort of orange-ish-brown color):



These cables are designed a lot like we design PCB's-- using the same CAD software.  They are designed in those  crazy shapes, and not just bent when it is all put together.  

Sometimes these cables are just soldered directly to the PCB's, other times they use connectors.  

With the right design, they can be capable of carrying several amps.

If you are making only one, in your garage, I would use copper tape instead of aluminum foil.  It is easier to solder to, and is more conductive.  Instead of "wrapping it in electrical tape", I would use two layers of thicker packing tape.  Lay one layer, sticky side up, and lay the pre-cut copper foil onto it.  Then lay another layer of tape, sticky side down, on top of that.  Squeeze.  If you want to be extra careful, use three layers of tape, with copper for +V between two of the layers, and copper for -V between the other 2 layers.  That way if the copper shifts around it won't short out so easily.

Update:

Instead of packing tape you might want to use Kapton Tape.  Kapton is a special tape that can withstand high temperatures-- like when you solder.  So you could use copper tape/foil with Kapton on the outside and then solder to the copper after you assemble your "cable".  Don't get the 1 or 2 mil thick tape, since that will be too thin for your purpose.  Go with 3 or even 5 mils.  

It is good to 500 deg F, which is hot enough to solder with but many soldering irons can go hotter-- so you still need to be a bit careful.  But it is a lot better than packing tape in that regard.  

The down side is that compared to packing tape, Kapton tape is very expensive.