Can a change in altimeter setting make you change the airspace?
No, fiddling with your altimeter setting doesn't change the airspace you are flying in. So you can't bust the class A above 18 000 ft by changing the setting. The top and bottom boundaries of the airspace are defined by applying the altimeter setting local to that airspace. 

Conversely, and perhaps more important, you can't weasel out of a busted airspace by quickly changing your altimeter setting. 

Your transponder sends your altitude as if your altimeter was set to 1013.25 hPA / 29.92 inHg, regardless of what your actual setting is. The ATC system will do the conversion according to their setting, so you can't fool them.

Note that the altitude resolution of your transponder is either 100 feet (Mode C) or 25 feet (Mode S with appropriate altimeter encoder), so 1 feet difference doesn't really matter.