You may encounter legal reference work in ANY library!! You may find the occasional legal reference question at the desk of a busy public library, or as a regular part of your traffic at a specialized law library. Many special libraries have a connection to law, including corporate, court, state, county, law firm, and academic.
Law librarians do legal reference in varying proportions to other work in a law library, but many librarians in other libraries also encounter questions from their patrons that involve the law to some degree.
One of the first questions I hear from graduate students in LIS is whether it's possible to enter this field without a law degree. In a word, YES! According to the most recent American Association of Law Libraries' (AALL) Biennial Salary Survey, only 27% of respondents had both the MLS and the JD degree. There are several good articles on this questions, as well.
Law library jobs that do require the JD tend to be in academia, especially in management. And since law librarians are recruited from law practice and law schools in addition to library schools, many law librarians find their "fit" within the profession after giving law practice a try. So the market for law librarians has remained relatively well-stocked with dual-degreed applicants for those positions that require both degrees. But if you're interested in law librarianship, there are plenty of opportunities for work in firms or other settings, that don't require the JD.
Keep an eye on the AALL's Career Hotline for job postings and descriptions.