Yes, a police officer can pull you over for speeding even if they themselves were exceeding the speed limit. Law enforcement officers are generally granted certain exemptions or privileges when it comes to traffic laws, allowing them to exceed speed limits or engage in other traffic-related activities while performing their duties. However, these exemptions usually apply only when they are responding to emergencies or engaged in official law enforcement activities.
If you are driving over the speed limit while following a police officer who is also exceeding the speed limit but not responding to an emergency or engaged in official duties, you could still be subject to a traffic stop and potentially receive a speeding ticket. The officer may consider your actions as independent violations of traffic laws.
It's important to adhere to the posted speed limits and traffic regulations regardless of the actions of other drivers, including law enforcement officers.