"Cry foul" - is foul a noun?
Solution 1:
As commented above, there is no real meaning in trying to determine what foul's "part of speech (POS)" is.
According to Urban Dictionary (which is deemed not very reliable though), "cry foul" came from a baseball term "foul ball".
Someone who strongly disagrees with another person's fair opinion/criticism. It came from a baseball term, "foul ball".
Foul has a noun usage as follows:
(In sport) an unfair or invalid stroke or piece of play, especially one involving interference with an opponent:
[Oxford Online Dictionary]
Considering the fact that articles are omitted in idioms such as "cry wolf", "cry murder", etc. and "foul" has a noun usage, it would be more appropriate to determine it is a "noun".
Solution 2:
I'm afraid I disagree with the other answers listed here. While it is true that when one were to "cry, 'foul'", in the act of doing so the phrase could conceivably be argued grammatically to be an interjection, that notwithstanding in the context of the original question it refers to the concept of one crying, "Foul play!" (which, AFAIK, is the original context in which the phrase was introduced into common vernacular). Strangely, I was unable to corroborate the etymological origins of the phrase in a brief search, but Google's Ngram Viewer suggests the phrase entered use circa 1820, 8 years prior to the introduction of the "foul ball" in baseball. "Foul play", on the other hand, has been used since at least 1636.
All of that aside, and regardless of the (debatable) interjectory nature of one crying, "Foul play!" the word "foul" is still an adjective describing the nature of the observed shenanigans. Moreover, I'd argue that "Foul play!" is not strictly an interjection (such as "Yikes!" or "Wow!") regardless of the exclamation point at the end of the sentence. An interjection conveys emotion and nothing else, whereas the statement in question conveys, "[I believe] foul play [is taking place]!" and the extraneous exposition is simply implicit.
TL;DR: the word "foul" in the context of the original statement is an adjective, defining the nature of the play being observed. The accepted answer above, suggesting that it is a noun, is certainly incorrect by any measure.
Solution 3:
The answers given do not explicitly state that (most don't even acknowledge that), in spite of the obvious literal origin of the expression, cry foul is now a verbo-nominal idiom in its own right.
ODO gives
Definition of cry foul in English:
Protest strongly about a real or imagined wrong or injustice: deprived of the crushing victory it was confidently expecting, the party cried foul
The direct speech interpretation
The fans all cried "Foul!"
needs the quotation marks to disambiguate (although in other cases, there is an acceptance of intermediate structures, omitting quotation marks where they would once have been regarded as mandatory. 'He wished them Merry Christmas.') This is therefore not indicated in OP; '... the saying "cry foul" ' confirms this. [bolding mine]
Although the fact that 'cry foul' is a verbo-nominal structure, analysing it as [V + N] is arguably unprofitable. Such idioms (eg weigh anchor, take care, break cover, make waves, curry favour, do time, down tools) often resist passivisation (*anchor was weighed) and don't accept pronominalisation (*He broke cover; he broke it before the dogs reached him.) The verby part and the nouny part (I'm avoiding the more precise attributives) are too cohesive in these expressions for one or both. I'd say 'cry foul' is a single lexeme, roughly equal to 'remonstrate'.