If one were to dream while sleeping of him or herself doing any sort of sin, is it a sin? (sources)
There is a Gemara (Berachos 57a) which mentions interpretations of various dreams, and many of them include doing a sin. For example:
There are many similar scenarios listed by the Gemara, and surely if it one has committed a sin by having this dream the Gemara would have noted so and not simply said it is a good sign.
Furthermore, while in a dream state one is not conscious of their "actions," which aren't really actions at all. It seems highly unreasonable to me that anyone would call such an "act" a sin per se.
At the same time, dreams reflect a person's subconscious. Therefore, if someone is having dreams about sins, they may want to do some introspection and try to figure out if there is anything unhealthy laying beneath their surface that needs to be fixed.