Not a good idea on a axle with diff gears. One inch dia difference will have one axle turning at a much faster rate which creates heat and wear on the side gears. Now if its just a couple of miles then a slow speed won't hurt anything. However it may be 60 miles to the next tire store.
Also anti lock braking can be affected from different diameter tires.
I would have the dealer mount a taller 17" tire on the wheel to match the 18" tires diameter with in reason. If the tire dealer is savy he can answer these type questions.