Anyone is allowed to come to Mass, or to simply visit the church outside of Mass. If you are worried about Communion, it is best to stay in the pew; some people go up and cross their arms to receive a blessing instead of the Eucharist, but some parishes may not do this.