Both Catholics and even Non-Catholics are always allowed to go up to the priest and receive a blessing, regardless of the state of their soul. In fact, this could be how they are led either back into a state of grace, or to the fullness of the Catholic Faith.

This is also what children are encouraged to do when they are not yet of age to receive communion.
If you are not able to receive communion (for whatever reason), but would like to receive a blessing simply cross your arms over your chest, forming an “X” shape, and bow your head. Priests and Deacons can take it from there.
Also, you may always make a spiritual communion. Kneel at your pew and say, “My Jesus, I believe that you are in the Blessed Sacrament. I love you above all things, and I long for you in my soul. Since I cannot now receive you sacramentally, come at least spiritually into my heart. As though you have already come, I embrace you and unite myself entirely to you; never permit me to be separated from you. Amen.”