ChatGPT:
The answer to the riddle is "a human." A human has three legs in the morning when they are standing and using a cane to walk. They wear a green felt hat at night when they are dressed up as a leprechaun for Halloween. And they may be lactose intolerant if they have difficulty digesting milk and milk products due to a deficiency of the enzyme lactase.
I hope this answer is helpful! Let me know if you have any other questions or if you would like to try another riddle.