Exact solution of a Yang-Baxter spin-1/2 chain model and quantum entanglement