The answer is very simple,
At "large, posh" hotels you can absolutely come in to the restaurant (for breakfast, lunch or dinner) or the bars (for drinks) simply as a normal person, pay money, and eat/drink.
The full service restaurants in "traditional" hotels are indeed simply "restaurant businesses as such".
Indeed, in most cities the most famous restaurants (for breakfast, or lunch or dinner) are indeed the restaurants situated in a hotel.
If the OP is thinking of, let's say, "hotel chains" such as Ibis in Europe, or Hampton Inn etc in the US. At such "hotel chains", simply no, you cannot generally just arrive and take part in breakfast, it's only a thing for hotel guests. The hotel chains don't really have a full service restaurant, they simply have a process where guests get a breakfast in the morning.
So quite simply,
At let us say "traditional" hotels, sure, the restaurants are full-service restaurant businesses in themselves: of course you can go in and have breakfast, as at any restaurant.
If you're thinking of "hotel chains" (Eg, Ibis, Motel6, etc) no, they simply do not have "restaurants" as such. There's just a facility where guests are fed breakfast. There's no sense in which you can "go in and pay for a meal" (for example, they wouldn't even have a cash register, etc).
If you ask "how to distinguish between the two", the only answer is "ask"!
With typical mid-range chains, it's hard to guess which category a hotel falls in. You just call and ask! "Is the restaurant open for breakfast, or only guests?"