The words ‘and’ and ‘or’ are almost always conjunctions. However, in the sentence “It was and I said not or,” they are both nouns. The one speaking is saying he used the word, ‘and,’ rather than the word ‘or.’
For instance, if I tell a person to move a table and a chair and later realize that one the chair has been moved, I might say I told you to move the table and chair, not the table or chair.
Still, you’re right. It is a dumb sentence that will only like be used as a puzzle.