Is is possible to take on enough protein to build muscle whilst eating a vegetarian diet?
Yes.
I'd be interested to know which foods you do consume.
When I had a vegetarian partner, I had to maintain a vegetarian diet, and she was a fan of (the now discredited) protein combining theory. The premise was that since most vegetarian proteins are deficient in one amino acid, that one should take a combination of 2 proteins so that one supplies the amino acid that the other one is missing. Typically, this means beans plus grains. While you normally can get by with getting all the proteins spread out over a day, if you are going to be working out vigorously, I'd recommend following the idea of protein combining. It was originally documented in the book Diet For a Small Planet. Working out with a vegetarian diet was harder than when I was on a meat based diet. I found that consuming protein shakes helped with getting enough protein.