This is what I have been doing for about 3 years. It goes on somewhat unevenly, though, so after the spraying, I usually rub it with a cloth, test it's stickiness on fabric, rub it again, etc. until it is just right. I also only use spray basting on fabric or rulers when I am in a very well ventilated place - never remotely near my sewing machines!
I have also used thin rubber bands when nothing else was available. It does 'hold' onto the fabric - until you cut the rubber band.