Yes, it functions as a relative pronoun in that sentence, and can, as is customary in English, be omitted without doing violence to the meaning of the sentence. The relative clause of this sentence would be considered restrictive.
According to the rules of a prescriptive English grammar, A nonrestrictive, or nondefining, clause is one that can be regarded as parenthetical:
My house, which has a blue door, needs painting.
The italicized words are effectively an aside and could be deleted. The real point of the sentence is that the house needs painting; the blue door is incidental.
Use commas to set off nonrestrictive elements, which contribute to, but do not determine, the meaning of the sentence. These elements may be clauses (groups of words that contain a subject and a verb) or phrases (groups of words that do not contain both a subject and a verb).
A restrictive, defining, clause is one that is essential to the sense of the sentence.
The mansion that the Rockerfellers built has been sold.
Here the relative clause is a defining characteristic, it helps to distinguish the mansion from other mansions.
Restrictive clauses or phrases are not separated off with commas. A restrictive clause or phrase is essential to the meaning of the sentence; it defines the word it modifies by "restricting" its meaning. Eliminating a restrictive element from a sentence changes its meaning dramatically.
Note that nonrestrictive and restrictive clauses must be introduced by the appropriate relative pronoun.