If it's the same as YM240/YM2000, and I expect it is - a stuck pedal usually means rust where the lever's shaft goes into the brake housing. There's an o-ring there so penetrating oil won't help.
The remedy on YM240 was to remove the brake housing cover plate, hammer that shaft out of it, clean, and re-assemble. With just the tiniest amount of grease applied/wiped off the shaft so it doesn't stick again.
I was able to do this without removing the wheel. I loosened the fender and rotated it back to get some space. This was safer than taking the wheel off for more work space. But on your smaller tractor you might have to block up the tractor securely and remove the wheel, to have enough room to work in there. My total project was an hour or so; but add time to your estimate if you need to block it up.
Take a look at this brake parts diagram from Hoye's website for an idea of what's in there. I hope yours is
YM1500-red! I see in Hoye's diagram of the transmission case that on
YM1500-green, far more parts need to be removed to get to the brakes and this project might be over the head of a backyard mechanic.
While you have the brakes apart you can swap front/back shoes, and turn the adjuster cam at the dumb ends of the shoes, to get years more service from the brakes.