As long as your gage matches what the pattern needs, it should be fine. Different yarns will knit to different gages on the same needles, so all you need to do is check your final gage.
So if it reccomends "Bla bla fabu yarn" on size 3 needles for 78 stitches per inch, but you use "Yada yada fantastic yarn" on size 18 needles for 78 stitches per inch, you're fine.
The only thing to remember is that really thin yarn knit on large needles can give you the same stitches per inch that a thick yarn on thin needles will give, but the DRAPE will be totally different. So, if you've knit up a gage swatch, found that you've got the right st/inch AND like the drape of the yarn, you're set! Knit on! If you've found that the fabric of your gage swatch is too thick, or too thin, with too much or not enough drape, even though you're gage is right, you may be in for a yarn substitution or some math.