It depends on the rules of the state in which you are licensed. I have a specialty license in Nevada, which means that I cannot practice outside the scope of my specialty. I also have a license in Texas which simply is a dental license (they do not have specialty licenses), so I guess I would not be limited to doing a filing, for example. Of course it would be "highly frowned upon" as stated above and you would also run a liability risk I suppose. Why would you do this anyway?
If you want to see an example of this, google Ben Burris. He's an orthodontist in Alabama that is doing prophies in his practices and the general dentists are trying to stop him. Interesting stuff and really not the same as doing endo as an ortho, but ultimately it comes down to the state board because they control the license under which you practice.