Since it only happens when pedaling, you can eliminate things like hub bearings and focus on things that move with the chain. As noted above an RD pulley is a good suspect, but the problem may be much simpler, a dry chain. It seems to come from the back because the chain flexes more winding onto the pulleys and smaller sprockets. Try some chain lube --- any chain lube --- before looking for or fixing anything more complicated.
__________________
FB
Chain-L site
An ounce of diagnosis is worth a pound of cure.
Just because I'm tired of arguing, doesn't mean you're right.
“One accurate measurement is worth a thousand expert opinions” - Adm Grace Murray Hopper - USN
WARNING, I'm from New York. Thin skinned people should maintain safe distance.