Why are my brake lights turning on randomly?

Ford escape 01

Vehicle was off in park with handbrake on, lights were set to off, car i would press the brake pedal to turn it off but the light would still come on. Also my oil light has been blinking on and off randomly, engine sounds fine, oil is full.

Added (1). by, come on, I mean the light would go out for a sec after i released the pedal then come back on, i disconnected the battery

May be two issues;
The brake light switch and the oil pressure sender.
Try pulling up on your brake pedal.
see

Oil sender

Try lifting up on the brake pedal and see if the light goes off and stays off. If it does then you've either got a return spring or a vacuum cylinder problem. If it still stays on the brake light switch is probably bad. As to the oil light, you need to have a mechanic connect a gauge in place of the sending unit to make sure the oil pressure is correct. If it is replace the sending unit. If the pressure is low or fluctuating then the oil pump needs to be replaced.