As @Abdul mentioned, and accelerometer measures acceleration which when integrated (adding together successive measurements over time) becomes velocity and when velocity is integrated you get position. So (in theory) you can use the accelerometer to track position.
The challenge with this is that in the real world you have error. As error is integrated over time it gets works and then when that is also integrated it gets WAY worse.
Last year our robotics team made a robot that focused on autonomy (the ability to drive itself). Initially we used the drive encoders to track robot position and orientation; but, when the wheels slipped or the robot was bumped it would go off path. To fix that, we added and accelerometer to correct. The initial results were impressive. You could bump the robot and it would return to the target path. Then one competition we had a several minute delayed start and rather than driving straight it immediately turned right and climbed the ramp. Epic Fail.
There are ways to correct (some) for the accumulated error. One technique is to use a Kalman Filter. Since the robot starts and stops a lot, the average acceleration should be zero. Also, you can compensate for bearing errors by using the magnetometer to detect and compare bearing changes. Another option is to use points where you know your robot's position, velocity, or orientation to correct calculated values.
The bottom line is that yes you can use and accelerometer to track potion; but, you will have to deal with accumulated error. The better you handle that the better your positional accuracy will be.