When one goes up to partake of the Eucharist, the priest says "The Body of Christ" and the recipient replies "Amen." This "Amen" signifies that he does, in fact, believe that this IS the real Body of Christ. He's also affirming belief in all the teachings of the Church. If he doesn't believe them, then it's a lie to say "Amen" and affirm that he does. We don't look at the Eucharist as just a symbol of unity, it is a sacrament, not a right.
Just agreeing with the teachings isn't even enough, though, one also must not be in a state of mortal sin. So even if I, as a Catholic, believe 100% what the Catholic Church teaches (and I do), if I have committed a mortal sin, I cannot partake of the Eucharist. This is why:
"Whoever, therefore, eats the bread or drinks the cup of the Lord in an unworthy manner will be guilty of profaning the body and blood of the Lord. Let a man examine himself, and so eat of the bread and drink of the cup" (1 Cor. 11:27–28 ). This is an absolute requirement which can never be dispensed. To receive the Eucharist without sanctifying grace in your soul profanes the Eucharist in the most grievous manner.
Here is an explanation of the requirements for receiving the Eucharist.
First you have to understand that Catholics believe in a thing called Sanctifying Grace. This is what we initially receive at baptism. Sanctifying Grace is what we believe resides in the soul and actually makes our souls holy. It gives the soul supernatural life, and actually it IS supernatural life. (There is also something called Actual Grace, which is kind of the kick in the pants that we get from God from time to time, to make us go and receive sanctifying grace through confession and through communion, etc...but Actual Grace doesn't reside in the soul.) This supernatural life is needed, we believe, to be able to exist in Heaven, because in Heaven we will be perfectly united with the source of all life, and we could not be perfectly united with Him if we were lacking supernatural life ourselves.
Now, Catholics believe this Sanctifying Grace is what gives us supernatural life, so that if we lose it, we lose supernatural life, and if we were to die without it, we could not enter Heaven. And what is it that causes us to lose Sanctifying Grace? Mortal sins, of course. Mortal sin kills that supernatural life within us.
What you also have to understand is that we believe this Sanctifying Grace truly cleanses us from our sins, it doesn't just cover them up. And so when we sin again, we are sullying our souls again, and they must be cleansed again. (Venial sins weaken us so that we may be more tempted to commit mortal sins, but they do not cause the Sanctifying Grace to leave our souls. Venial sins are cleansed by partaking in communion and praying for forgiveness, etc. Mortal sins have to be confessed to be cleansed.)
Now, in order to receive communion, one must be in the state of Sanctifying Grace. That is, one must not have any mortal sins that have caused the Sanctifying Grace to leave our souls. One must be baptized to begin with (because otherwise they have not been infused with Sanctifying Grace), and they must not have committed a mortal sin that has not been confessed. This is the reason: Just as we cannot be united with God in Heaven when we do not have Sanctifying Grace, neither can we be united with Christ's flesh on Earth when we do not have Sanctifying Grace. And to partake of Christ's body and blood while we ourselves are not in a state of Sanctifying Grace is a very, very serious sacrilege. It is, in fact, putting Christ's holy and pure flesh into a soiled container, if you will, into a container lacking supernatural life. Doing this is considered a mortal sin in and of itself.
So, because we can't know that our Christian brothers and sisters are in a state of Sanctifying Grace, and also because they don't profess to believe in the Real Presence, for the protection of their souls (that they don't unworthily partake of the Eucharist) and so that a sacrilege isn't committed, we say one must be Catholic, and be in a state of Sanctifying Grace to partake of the Eucharist.
Now, as for attending mass, ANYONE is welcome to attend mass, that is not "communion." The only thing a non-Catholic should refrain from doing is actually partaking of the Eucharist, actually ingesting what we believe to be the body and blood of Christ, because of the above reasons. Here's a more detailed explanation of the Catholic view of grace and justification and sanctification.