Yes, you can wear jeans in Marrakech. You might want to avoid really tight-fitting jeans, partly because when it's hot they'll be really restrictive, and you might get stared at a little more. You can always wear a longer top that covers you up if you're worried about feeling uncomfortable.