No you can't tell by looking at their ID card or their accent unless the surname of that person clearly indicates the caste.
> Is it on your ID card?
EDIT: The only place where you ever need to fill your caste is in your application for ID card or while applying for an University. However, your caste is not printed on the ID card though you are provided a certificate for it (that you need to provide in case you want to avail any government benefits). You can see an example of Voter ID card here: http://3.imimg.com/data3/RA/DI/MY-513699/pvc-electrol-photo-...
This is an example of Aadhar Card (similar to SSN in the US): http://1.bp.blogspot.com/-2yVnN-Mji48/VK6hZ6KAWAI/AAAAAAAAG-...
> Is there anything stopping someone from moving to a different city and pretending to be a different (better?) caste?
That won't work. The issue is that no one wants to "leave" their caste. There is no better or worse caste these days. It was the case centuries ago where the Brahmin caste was considered superior to the rest (when Kshtariya Kings ruled India). That is no longer the case. In the ancient times, education was only restricted to upper castes. These days we have quotas (almost 50%) in education/jobs sector for lower castes.
The only place where caste has a major impact is in marriages and politics. If you love a person from a different caste and your in-laws are against your caste you'll have a tough time dealing with that situation. Unless your in-laws are total whackos (see news reports on honor killings) you should be able to convince them. Those who can't convince elope and get married.
When it comes to politics casteism is rampant. If you belong to a particular caste and your caste does not have enough representation in that constituency you are standing from you are bound to lose (irrespective of whether you are a good candidate or not). Each caste votes as a group and only vote for their own candidate. The reason for that is all castes in India want a slice of the pie. Some castes want higher quota in education while others want quota in private sector etc.
If you hear stories about how bad the caste system is in India take it with a pinch of salt. Most of it is politicking. There are however a few real cases of caste based violence that mostly go unreported by the mainstream media as the people involved in that violence do not have political patronage.
If you hear someone saying that they want the caste system to be abolished what they really mean is the modern caste system (of which I gave examples of) rather than the traditional caste system (that which existed centuries ago and of which you find a lot of articles/writings on the interwebs).