There are certain occupations where this would be frowned upon and in some cases prohibited. Some military services for instance, especially if the ranks vary greatly. There are, generally, no other...
State, county and municipal (city) employees work, respectively, for those distinct divisions of government. All are public employees, however, since all work for government, at some level.