Yes. A solicitor acts only on the facts of the case not on any personal feelings or knowledge. A lawyer could be for the defence on a case one day and then for the prosecution against the same person the on another case later. No time limit a solicitor could defend a person one day and prosecute the same person the next day or years later.
^^ Yes you have a point , but technically a solicitor can defend and prosecute the same person on different cases. There have been many occasions when this has happened.
Any way the question is can a solicitor 'stand up for you' in more than one case , to which the answer is 'Yes' . The defence and prosecution bit was my take on the subject.