Let’s figure out when you need to put single words such as “yes” and “no” in quotation marks.
It all boils down to whether you’re dealing with a direct quotation or an indirect quotation.
A direct quotation is when you’re directly quoting what someone said—word-for-word, not paraphrasing. You put direct quotations in quotation marks.
So if you were hanging out with Squiggly in Ghirardelli Square, and you asked him if he wanted some chocolate covered cashews, and he looked at you with big eyes and simply said, “Yes!” you could later report to Aardvark that Squiggly said, “Yes,” and you’d put that in quotation marks since that’s exactly what he said.