can I still have benefits buy training only the right side plus squats?
Let's first deal with the question of only training the right side.
I would heavily caution against training one side more than the other side. This would be a surefire way to develop muscular imbalances which cause chronic injuries and pain down the line. Training should always be done equally on both sides.
For the question of squats; yes and no.
Yes, there are benefits to be had by doing squats while your upper body is injured, BUT, and this is a very serious but: You MUST confer with a physician before doing so. The reason for this is that we don't know if loading the bar onto your shoulders is going to worsen the shoulder injury you have. And it's very likely that it will. The same also goes for other exercises like deadlifts, because also there the weight is loaded onto your shoulders (via the arms).
Due to the ambiguity of knowing there's an injury present, but not knowing enough about it, the answer can only be: Go see a doctor before doing any sort of weight training.
injuries