There will be nothing wrong with the motor - it should run when it has power and not run when there is no power.
If the motor is running then it will be getting power.
Your challenge is to find out where the power is coming from.
Despite what you say about checking the foot pedal my guess is that is where the fault lies - there or in the cable. The cable will have a permanent live for the machine's light - perhaps that's where power for the motor is finding its way into the machine - a short between one conductor and another.
I know nothing about sewing machines.
Good luck...
March 2015