No. To erase codes form an OBD-1 vehicle (made before 1996), the engine does not need to be running.
On a side note, NEVER disconnect the battery while the engine is running; it will damage the computer.
Never disconnect a battery while an engine is running!
put a voltmeter on the battery and test voltage, then start the cycle and check again. A battery at rest should be at about 13 volts, with the engine running it will be at 14 or above. to be sure disconnect the positive battery terminal while running, if there is still good volts there, or the engine does not die it is ok.
I'd check your alternator. Disconnecting the positive terminal while the engine is running will tell you. If the engine dies when you disconnect the battery, it's your alternator. If it keeps running it's something else, like your battery. I had the same problem.
disconnect the positive connector on the battery
Get engine running. While the engine is running disconect the POSITIVE termninal from the battery. If the engine dies, the Alterntor is bad.
Disconnect the POSITIVE battery cable and touch it to the negative terminal OR disconnect the POSITIVE battery cable for about 30 minutes (either way drains the capacitors in the electrical system)
Disconnect the positive battery cable for a couple of minutes.
disconnect the positive battery cable then reconnect.
If your alternator is good it should stay running until your engine dies from no fuel.
disconnect your battery's positive terminal, Wait a couple of minutes then reconnect. All done.
disconnect the positive battery cable for about 10 minutes
disconnect positive battery cable for five minutes.