Most states real estate licensing laws say that as a real estate agent you can not list or market a property unless you have contracted with the owner to do so.
I have never seen any non-real estate agent laws that say you can not market a property unless you own it. And legally you do have an equitable interest in the property through your contract, which means that you are not acting as an agent. As a wholesaler you are attempting to sell YOUR interest in the property which is via a contract to purchase it.
I would relay to you that most realtors are deeply ingrained with the idea that everything outside of their box is "illegal", and many times for a licensed real estate agent it very well may be.
For non-agents, though, the laws aren't as thorough or detailed and many things that are "illegal" for a realtor are perfectly legal for a non-agent. I would recommend that you stop talking to your agent about wholesaling. They don't understand it and most of them have very negative ideas about it.