They will stretch apart to some extent and usually sufficiently if it's a frame for 26" or larger wheels, but tend to revert to almost the old width as soon as you let go. It is risky though.
However, if you aren't taking the motor wheel in and out all the time, springing the frame slightly to get it in might not be a problem. Much depends on how much it needs to part, since stretching it a lot will leave the dropout blades out of parallel, veeing out to the rear.
I did stretch a frame on a 20" wheel bike to take a wider motor assembly, but with the short stays on that I had to part two joints and then weld the alloy again, not an easy task. You can read about that with how I corrected for the parallel problem and see the photos
half way down my webpage here.
Also I always used to manually stretch a Lafree alloy frame for tyre or tube changes past the l/h spindle as this photo of me doing it shows: