I have a 26/1.5 MTB rim, that I use a slick 26/1.25 tire on. It doesn't give me problems.
I actually like that the tire is narrower than the rim, it means I don't have to mess with my brakes when I remove the wheels for flats.
There's probably a practical limit to how big the width descrepancy can be though. Try it and see. If the tire doesn't blow off on inflation you're fine.