Generally speaking, no, priests are not supposed to refuse communion based on private sin due to the circumstances you mention (the individual may have gone to confession). The only real exception to this are public actions that run contrary to the faith and therefore these require some kind of public renunciation in order to be restored to full communion. However, outside of marriage issues this rarely affects everyday people.