Google Book Search now automatically includes, at the bottom of the search results page, "Find libraries" links to locate libraries near you which stock the book you searched for (e.g. see this "Harry Potter" search), as announced on the Google Blog.
This stems from a link up between Google and certain library union catalogs - you'll see the "Find libraries" links effectively take you to search results on WorldCatLibraries.org, and in fact if you just want to do a library book search you don't even have to go through Google Book Search, you can just search on WorldCatLibraries.org direct.
However I've found the searching to be a bit erratic. You obviously need to enter your location information - country or postcode - in order to narrow the search down to the catalogues of libraries near you.
Now this search for a Harry Potter book works fine when I enter the postcode for St Paul's Cathedral, London. But searches for the same postcode with some other books, e.g. Lee Child's The Hard Way, refer you to a library in Germany (or in other cases North America e.g. this other Harry Potter book - and there has to be a copy of Goblet of Fire available in a library nearer to London than Toronto)! Clearly there are still some bugs to be ironed out..
Still, all in all it's a great idea - I'm a big fan of libraries as I rarely buy books (I read very fast and would run out of storage space and money if I bought everything that I read). You can always encourage your local library to contact Google to get its catalogue indexed by Google Books too, if it's not already on there. The more the merrier, in my book!