Yes, depending on the thickness.
Answer:
The traditional electrolyte for aluminium electrolysis is based on molten cryolite (Na3AlF6), acting as solvent for the raw material, alumina (Al2O3).Metals are found in ores combined with other elements. Electrolysis can be used to extract a more reactive metal from the ore.
Aluminum can and is used as both anodes and cathodes in electrochemical cells, but there are some peculiarities to using it as an anode in aqueous solutions. As you note, aluminum forms a passivating oxide layer quite readily, even by exposure to atmosphere. In an aqueous solution, if the potential is high enough, OH− and O2− are generated at the anode, which can then react with the aluminum to produce aluminum oxide. Al^3+ can also be generated directly. The electric field will draw the anions through the growing aluminum oxide layer towards the aluminum surface and the Al^3+ towards the solution, making the oxide layer grow both away from the electrode surface and into the surface of the electrode. In this way, coatings thicker than the normal passivation in air can be produced. However, aluminum oxide is a good electrical insulator, thus if a dense non-porous layer is grown, it will become impossible to pass current through it and growth will stop, leaving a relatively thin oxide layer (this is how the dielectric layers in electrolytic capacitors are made). This is the normal behaviour in aqueous solutions at near-neutral pH (5–7).
However, if a thick aluminum oxide layer is desired (e.g. to produce coatings on aluminum parts for dying or durability), maintaining porosity is necessary to avoid completely blocking access to the surface. One technique that is commonly used is using a low pH solution, which tends to redissolve some of the oxide and neutralize some of the formed OH−, leaving pores in the oxide layer through which the ions can travel and continue to react. These pores also give a good structure to retain dyes or lubricants, but generally need to be sealed after to protect against corrosion.