Only if a guy is passive would he be considered gay. Sexual activity among men has not been seen as gay.
Morocco is a country where the sexes were until recent decades, totally divided.
Times have since changed and it should be noted that homosexuality is illegal however the country is very tolerent and people live and let live and what happens behind closed doors remains there. Historically Tangiers was referred to as Costa del Sodomy by Joe Orton in the 1960's since young attractive men would throw themselves at gay visitors and the harems that existed in the city. Morocco has been a favourite travel destination for gay travellers for many years since the people are warm and welcoming and whilst a moslem country it is fairly liberal.