Yes, There are several ways in which an officer can obtain admissible evidence whilst committing an offence.
For instance: you may be driving dangerously and above the speed limit. An officer can follow you at speed in order to aprehend you.
More details are needed. What offence has the officer committed ? What is the evidence obtained ? In what way did the offence committed by the officer enable him or her to obtain the evidence ?