It's possible to do it legally, but probably more hassle than you want. Doing what you suggest would make it into a literal gendoki-tsuki jitensha, that is, a bicycle with a motor on it, which is a moped or scooter.
I believe a roadworthiness test would be required before it could be used on a public road. The rider would certainly have to have a driver's license and wear a helmet. The vehicle would have to be registered, have a number plate, lights, and turn signals, and the jibaiseki compulsory vehicle insurance.
If it will only be used on private land, then forget what I just said and have fun!
She's not into cycling beyond the occasional haunt around the neighborhood. She likes the idea of a motorized bicycle mostly for the novelty of it all than from the standpoint of transportation. I like tinkering with things so the idea of installing a gas engine is appealing.
I'll probably end up doing it. We are in the middle of farm land, there are plenty of rice field trails all around.