tl;dr- Yes, wearing hair such that it's pulled tight can cause hair loss. Wearing loose-fitting hair styles or head wear shouldn't cause as much hair loss; whether or not it causes none at all or just a little is unknown.
A good overview of related conditions is provided in "Hair Disorders and Alopecia" (2012) from the Textbook of Clinical Pediatrics, Volume 1.
Yes, it's a real condition called "traction alopecia":
Traction alopecia is a form of alopecia, or gradual hair loss, caused primarily by pulling force being applied to the hair. This commonly results from the sufferer frequently wearing their hair in a particularly tight ponytail, pigtails, or braids.
Since the above was from Wikipedia, here's an excerpt from the Textbook of Clinical Pediatrics, Volume 1, "Hair Disorders and Alopecia" (2012):
Traction Alopecia and Trichotillomania
Based on the mechanical action, traction alopecia and trichotillomania are similar. Hair is plucked out of the skin, leaving clear bald patches or diffuse, thin hair. With traction alopecia, the cause may involve tight hat bands, pulling the hair into a tight pony tail, cornrow hair styles, and any other action that pulls on the roots of the hair. If traction alopecia continues for a long time and the same hair region is repeatedly pulled out, the hair follicles in this skin region become cumulatively damaged and they may stop growing hair permanently.
The above calls out "tight pony tails" and "tight hat bands". As noted in the question statement, there are some people who point out the uncertainty over loosely worn hats, e.g. from "Will Wearing Hats Make You Go Bald?" (2012):
But hats don’t provide nearly enough tension to cause alopecia, Samrao says. “I don’t see how a hat could cause that, unless you’re wearing it so tightly that it’s pulling your hair.”
Other sources don't call out tightness as much. For example, a study on why hats can cause hair loss ("Altered Serum Micronutrient Levels in Female Alopecia Subjects with History of Prolonged Use of Cap/Scarf" (2014)) refers to the hair loss as "cap/scarf-induced" without explicitly calling out tight-fitting head wear:
The etiology of most types of alopecia is not fully understood. Excessive use of hat is believed to be a cause of alopecia, but the possible involvement of altered micronutrients (essential elements and vitamins) levels in cap\scarf- induced alopecia has not been explored. This study is therefore embarked on to identify if alteration in micronutrients levels exists in subjects who may have cap\scarf- induced alopecia. [...] The result of this study suggests that altered serum levels of micronutrients and total protein may exist in individuals who may have cap\scarf- induced alopecia.
Most of the above seems to discuss traction alopecia, though here's a source that discusses "traction folliculitis", which appears to be related: "Traction Folliculitis: 6 Cases Caused by Different Types of Hairstyles That Pull on the Hair" (2009):
Excessive hair traction caused by hairstyles that pull the hair too tightly may cause noninfectious mechanical and irritant folliculitis known as traction folliculitis. We present a series of 6 cases of traction folliculitis caused by different hairstyles. All patients were women aged between 12 and 26 years old. Their hairstyles were braids, ponytails, pigtails, cornrows, and hair extensions in 2 patients. The lesions consisted of small, slightly painful, follicular pustules confined to the sites of maximum hair traction and surrounded by erythema. Only in 1 case were the lesions associated with traction alopecia. In 2 cases in which bacterial cultures were done, Staphylococcus aureus was isolated. All patients improved after undoing their hairstyle and treatment with oral flucloxacillin. We assume that the role of S aureus is secondary and opportunistic, given that only follicles subject to traction and not the adjacent ones were affected.
While there seems to be a general consensus that tight-fitting hats and hair styles can cause hair loss, there's more skepticism about loose-fitting hats and hairstyles. This uncertainty seems to appear in a lot of cause-and-effect relationships where we're not sure if a little bit of a cause still leads to a little bit of effect.
My impression from the literature is that they're not particularly concerned because, even if wearing a hat a bit can effect a slight bit of hair loss, that's probably not something people really need to worry about.
Overall, it seems that wearing one's hair with tight strains can cause hair loss, whether the strain's due to head wear or how the hair's styled. Whether or not gentle hair strain can cause a little bit of hair loss isn't known.