While it is technically possible to cook rice porridge in aluminum foil, it is not recommended due to potential health risks and uneven cooking. Aluminum foil is not designed to withstand the high heat of cooking and can leach aluminum into the food, which may be harmful. Additionally, the foil may not distribute heat evenly, leading to uneven cooking. Instead, use a proper pot or a rice cooker designed for cooking porridge to ensure safety and better results.