||As far as your specific question is concerned, yes, heroin can be used orally, though it will take a much larger dose than would be injected or snorted.|
Unfortunately, the wording of your question is somewhat confusing. The first thing to clarify is that MDMA is a pure chemical. Ideally when buying tablets of ecstasy you would be getting only MDMA as an active ingredient. However, because of the huge market for ecstasy, it's easy for any variety of substances to be put into a pill and sold as 'ecstasy'. There has been a rumor floating around for quite a while that 'ecstasy contains heroin'. In order to even possibly be true, this would have to be reworded 'some tablets of street ecstasy may contain heroin'.
Next we can look at the evidence. We have one specific document written by Nicholas Saunders which goes into some detail about this issue :
You can also check out the various ecstasy pill testing sites from the past 5 years or so and I believe you will find 0 instances of heroin being found in pills...out of hundreds of pills tested. It is certainly possible for heroin to be put into a pill and sold as ecstasy, and it's quite likely that it has happened somewhere sometime, but it is definitely not a common thing.
Hope this helps.