Is Pars intermedia functional in humans?
Both- the textbook and your teacher are right.

The most obvious function of the pars intermedia in lower vertebrates is the secretion of melanocyte-stimulating hormone (MSH) for the purpose of pigmentary control.
In human fetal life as well, this area produces MSH which causes the release of melanin pigment in skin melanocytes.
In adults,


The human pituitary has no distinct pars intermedia (PI). Instead, the proopiomelanocortin (POMC) producing, adrenocorticotropin (ACTH)- and β-endorphin-immunoreactive PI cells are incorporated within the pars anterior, thereby participating in the formation of the pars distalis.

Edit:

POMC is cut (cleaved) to give rise to multiple peptide hormones. Each of these peptides is packaged in large dense-core vesicles that are released from the cells by exocytosis in response to appropriate stimulation:
α-MSH produced by neurons in the ventromedial nucleus has important roles in the regulation of appetite (POMC neuron stimulation results in satiety) and sexual behavior, while α-MSH secreted from the intermediate lobe of the pituitary regulates the movement of melanin produced from melanocytes in skin.

Sources:

https://link.springer.com/article/10.1007/BF02738816
https://pubmed.ncbi.nlm.nih.gov/6912095/#:~:text=Abstract,the%20purpose%20of%20pigmentary%20control.
https://en.wikipedia.org/wiki/Pars_intermedia