True. They do after all own it and provide service or goods in exchange for currency. It's their right to not provide the service in exchange for you not providing currency. The thing that defends the consumer? They WANT your currency.
No, it's not true, at least not in Canada and the United States -- I don't know about Bosnia and Herzegovina, maybe that's different. It is illegal to run a "whites only" restaurant in the United States, a "men only" hotel, or a "no muslims allowed" movie theatre. Yes, it's private property, but it's a
public accomodation, and there are laws regulating your ability to so grossly sort out your customers. That's not something I made up, that's from the 1964 Civil Rights Act that ended segregation. These laws exist because the profit motive
wasn't enough to protect customers; instead, they'd profit by catering to racists who wanted discrimination. It became a massive problem in some areas in terms of quality of amenities for a vast number of people, not to mention the social tensions and stigma that arose from segregation. So no, you
don't have that right, at least not in the US or Canada -- you don't have it because the government specifically denies it to you.
The only major exception to this rule is private clubs; eg, you can have a private nightclub that caters only to a certain class of people and has strict entrance requirements, but you can't do the same for a restaurant. As the definition of a private club is vague, these are likely going to be sanity checked on a case-by-case basis based on what seems to be in the spirit of the law.