Yes. A factory reset will remove certain location-based tracking, such as the Find My Phone feature. If the phone has a SIM card, it can still be tracked by seeing which cell towers it pings or by looking up the phone number. If you begin to reinstall apps and log into accounts, you can still be tracked as you were before too.