Copyright protects the work of invention and its author from copying.
Trademarks protect the identity of a business or product. Something different (not copied) but which uses the "identity" of another product to sell.
You can publish a book devoted solely to McDonalds restaurant, and it would not infringe copyright nor trademark, it's a book of photographs, there is no "copy" and there is no attempt to steal identity of the McDonald's franchise.
You can't open a fast food and adopt a similar brand, or logo, in such a way that it could create confusion between McDonald's and your business.
When Andy Warhol used Coca-Cola bottles, or logo, or Campbell soup cans, or logo, in his body of work he was not violating trademarks, nor copyrights.
Certain stock agencies do exclude images having trademarks just because they understand that their typical users don't know the laws about trademarks and would find a way to violate it, and then it could be argued that it was the duty of the agency to educate the client/user, hence the "paranoia" of certain agencies, and of certain photographers, about trademarks, copyright, property etc.
It's all much simpler and, to simplify, it's basically always fair game unless there is commercial use (promotion of a good or service) or defamation (of a person, even a paid model, and of a firm).