I haven't personally played the game, but here is the best I can understand for this.
There are some Alolan Pokemon that are version exclusive to either Sun or Moon, such as either the Lycanrocs or Alolan Vulpix and Sandslash.
Almost all Pokemon that can only evolve in one game or can only be found in one game follow that rule, if they can't evolve in that game, it just can't happen. The version exclusive Pokemon also follow this rule.
Lycanroc is no exception. You can't evolve Lycanroc into it's Midday form in Pokemon Moon. However, you can catch it's Midday form. If you want, check out Lycanroc's info on this site. It states that you can evolve Rockruff in Midday form during day only in Pokemon Sun.