Yes--though you don't necessarily need to answer. A police officer is free to ask anyone anything, at any place where the officer can legally be (so, for example, if allowed on the employer's premises by the employer). However, you have a right to not answer the police officer; furthermore, you can simply ignore him/her and walk away--unless he or she actually  arrests you (which requires proper cause if it's to be legal). If the police officer publically (i.e. to other people) makes untrue negative statements about you that would damage your reputation or make others not want to work with you--for example, accusing you of having committed a crime, when you did not--it's possible you might have a defamation claim against the office, department, and/or municipality.