Yttrium -- rare earth or transition metal?
Comparing "transition elements" to "rare earth elements" (REE) is a bit like comparing apples and oranges. It all boils down to the different ways in which the elements can be classified.

Let's take a look at the periodic table:


(modified from this)

The rare earth elements are marked with a red outline.

Why are all rare earth elements are technically transition elements?

Strictly speaking, transition elements are the elements in groups 3 to 12 of the periodic table. The rare earth elements, in their widest sense, are Sc, Y and the lanthanides, La to Lu. You can see that if you group the lanthanides as one element, they fit nicely below Y in group 3 of the periodic table. The lanthanides are occasionally called the "inner transition elements".

Why is yttrium a rare earth element?

There are chemical and historical to the inclusion of yttrium in the rare earth elements.

Historically, yttrium was among the first elements to be isolated from the REE-bearing minerals of the Ytterby mine in Sweden. What was though as first to be "yttria" was later shown to contain also the rest of the heavy REE. It just took a longer time to purify them.

Chemically, yttrium commonly occurs with the other REE in the same mineral deposits around the world. You probably know the the chemical properties of the lanthanide series vary continuously from La to Lu. Yttrium also follows that pattern, and in terms of chemical properties it sits very nicely somewhere between Dy and Ho (that's why it's associated in mineral deposits with the heavy REE).

Yttrium is commonly used in the same high-tech applications as the other REE: it is commonly alloyed with other REE for speciality materials. It is also commonly used in combination with the other REE in lasers and various detectors in electron microscopy and analytical chemistry.

A different look

If you take a look at this figure, taken from here: https://earthscience.stackexchange.com/a/2951/725



You can see that most transition elements, as they appear in nature, usually have a cationic charge between 60 and 80 pm. The REE (including Y) are somewhat larger than that, resulting in slightly different properties.

You may also be interested in reading the answers to the following questions, also here on Stack Exchange:

What are rare earths and why do they cluster near alkaline magmatism?

Why are the rare earths erbium (Er), terbium (Tb), yttrium (Y) and ytterbium (Yb) named like that?