From my window I can see a dog who/which lives in the kennel.
--- Is it correct to use either "which" or "who"?
Technically, neither is correct. "Who" is reserved for people and, in some cases, known animals. "Which" is used for nonrestrictive relative clauses, e.g., "Nabakov's first book, which he wrote in Russian, never became a classic."
The relative pronoun you want to use in this case is "that," which is used for restrictive relative clauses.
The book which I borrowed on Friday is very interesting.
According to what you're saying, do you think that 'that' should be used in the above sentence? I find it perfectly OK with 'which'.