Morocco is a very popular destination for tourism. It's normal to see women both in and out of hijab there. You won't offend anyone by wearing the hijab as a non-Muslim, but you also won't offend them if you don't wear it. Just remember to cover your hair, arms and legs when entering the mosques and you should be good.