It's pretty easy to take a bag with all those little attachments for the leash. If I were out of bags I would welcome someone offering me a bag! I have offered bags to people walking by my house - I live on a corner and the garden seems to be everyone's favorite spot to stop, as if I don't see them! I want to put up a sign that says "If your dog is in my garden, he'd better be weeding it!"
Now, the off-leash thing might depend on your town's laws. Dogs who are off-leash but under voice command are okay in our town. I report people who don't clean up after their dogs - the Animal Control Office sends them a letter and a fine, and never divulges the name of the person reporting. I've also told people that I'm offering them a bag so that they don't get fined, I'm sure you want to be responsible, aren't I helpful, we dog owners have to help each other, blah blah. Obviously it's more difficult when you don't know who the person is, but if you are walking and can stop to pet the friendly dog, check its tags as if you are looking for a name tag to get acquainted - sometimes you can memorize the dog license number and then call it in.
I don't think yelling at the person is productive - tends to make them defiant. You could make your point by saying "Excuse me, your dog just pooped there and I'm sure you'll want to clean it up before someone steps in it or you are fined." You could suggest that your town post signs at the parks and indicate a fine. Some parks actually provide dispensers for bags or charge a small membership fee for dog owners for a "permit" to have their dogs there.
I once saw a town official walking a massive dog who pooped and then they just walked off - well, after the official spent 2 minutes kicking the poop off the strip of grass and into the street into 5 new piles. I scurried down the street and said "Oh, hi there, aren't you our newly-elected official?" "Why, yes I am," said he with a big smile. I said, "Oh well, can you tell me why you don't feel you need to follow the town's by-laws?" He said he usually has a bag and just forgot. I reminded him that his dog had been pooping on our sidewalks for years. He went home and drove back with (I kid you not) a few paper towels. I walked back over with a bag and a pooper scooper, and told him everything in the street was going to wind up on car tires and now in the garages of the voters. When I was done, I called Animal Control to report the entire incident.
He never did it again.