Very often, no in fact, most of the time, I find that the yarn called for in books is the top-of-the-line stuff, unless the book or pamphlet is put out my one of the manufacturers of less expensive stuff, like Patons or Plymouth.
I don't understand what happened with your pattern. When I substitute a yarn I ususally just make sure it's the same weight and yardage and am good to go.
A good on-line source of inexpensive yarns is
www.smileysyarns.com
It has a pretty wide variety of weights, and the prices are reasonable. For the first few projects you make, don't feel compelled to use the "good" stuff. Some of the acrylics and blends (I like Plymouth Encore) are reasonably priced, knit up well, and are machine washable and dryable. Smileys has an acrylic call Sorrento, I believe, that is very inexpensive, but not bad to work with. It's soft and doesn't have the plasticy feel of some of the really cheap acrylics.
Then again, you can find yarn at $30 a skein. I think that's ridiculous, too.