Hi lizzyizzie!
DON'T RIDE THAT BIKE AGAIN until you've taken it to a bike shop for repair - we want to have you around for a long time, and that might not happen if your brake fails!
Competent bike mechanics (of which there are few, anymore) can disassemble & repair that coaster brake. Most shops won't want to take the time & will, instead, sell you a new wheel complete with (newer and cheaper) coaster brake.
Plan "B" might be to ask if a front hand brake can be installed. The front brake will stop you sooner anyway and provide redundancy to the rear coaster.
In no circumstances should you ride with a defective coaster brake - it just aint safe! Good luck!