Agency is difficult for the general public to understand, especially with many states doing their own "thang" (I like that word) with no universal standards.
Green path, look at it this way.
A listing agent represents the seller for an agreed to "$ amount A", the listing agent/broker, offers a co-op fee "$ amount B" to other agents who bring a buyer. So, in the listing agreement, the seller agreed to compensate the listing agent AND provide funds, which are advertised in the MLS, to entice a buyers agent to show the property to their buyer.
Now, if the listing agent also has the buyer, he will get the "$ amount A" plus the "$ amount B", it's called "getting both sides" of the transaction.
If the buyers agent sells his own or incompany listing to his buyer, the same scenario as far as payments occur.
Depending on how a listing agreement was written, some sellers insist on a reduced fee to the agent if the agent gets both sides of the transaction.
It looks like your state has Dual Agency when an agent sells his own/company listing. The broshure in the link below explains the different relationships an agent can have with their customer/client in N. Carolina.
http://www.ncrec.state.nc.us/pdf/brochures/WorkingwAgents-8.5x14.pdf