I saw a registered trademark being used to identify the goods/services for an unrelated applicant's registered trademark.
For example, the trademark "Oreo" being used by another, unrelated applicant in the description of their Goods and Services: "oreo [not capitalized] bakery." The applicant's trademark has a registration certificate which identifies the goods/services as "oreo bakery" so at some point the examining attorney must have seen it. Can unrelated applicants use a lower-case version of a trademark to describe their goods/services?
There are no hard and fast rules about how (or how much) you might change someone else's trademark before you might be able to use it for another purpose. Rather, the courts have defined a set of factors, sometimes called the DuPont factors, to determine if there might be a likelihood of confusion. Ultimately, this is a question about whether consumers would be likely to confuse these two marks; that is, would a consumer be likely to think that products or services from one would originate from (or be endorsed by) the other.
So, yes, a Trademark Examiner (who is an attorney that works for the government in a quasi-judicial capacity) has reviewed the oreo bakery trademark and allowed it. Maybe he considered the famous Oreo trademark, maybe he did not. There may be notes about the trademark search that he performed, that might let you know. While I love Oreos, and, I would not miss a chance to think about those famous cookies, but, maybe the Examiner is a health nut and does not know of them.
Yet, it is just as possible that the Examiner considered the DuPont factors and decided that a there was no likelihood of confusion. It may have been because of a difference in the goods and services. It might have been from a difference in channels of trade, for example, oreo bakery may not sell to the public, but just as a contract manufacturing bakery. It might have been a difference in commercial impression, or, meaning. It seems very unlikely that the lowercase O was the entire reason for allowing the trademark. A careful review of the history of the trademark application file wrapper will reveal much about what happened.
Judgments about a likelihood of confusion are one of the reasons to use a trademark attorney. We spend time reviewing cases and honing our judgment to help understand close calls. I suggest that you consult with a trademark attorney to better understand your situation.