I think the cheapest Yamaha that has step editing would be one of the PSR-SX or older PSR-S models, but you'd need to check the manual of any particular model to see whether it has the "Song Creator" feature.
Casio also makes CTK and WK models that have step editing, but again you'd need to check the manual of any particular model to see whether it has this feature. I'm not sure if Casio has a specific name for the feature.
However, there are many computer programs available for editing MIDI files, and some can be downloaded and used for free-- for example, SynthFont (version 1) or the Anvil Studio DAW, among others.