That is true, some clothing will automatically show others that you are a foreigner. However in some countries there are certain types of clothing that is not allowed in public or in Mosques for example it is important to take of your shoes, and for women to cover their hair. Or it is important for women to cover their arms/head in public.
Are there any rules like this that foreigners might not know about when they travel to Tajikistan?
This is a very classis topic that a lot of us face when we travel abroad. Tajikistan is very secular compare to other Muslim countries and as Sino pointed out above that people are very understandable in terms of foreign clothing, especially in the big cities. However, it remains not so true if you travelling to smaller cities, rural and suburban areas. If you visiting small village it is better to wear something long sleeve, and long pants instead of shorts, but you do not have to cover your head/face or anything like that :)
People tent to feel more comfortable talking to you when they see your clothing is just like others and it is kind of respect to elderly people whom are considered to be more into religion, at least, that’s what I think from my personal experience.