It may be written in pencil or in pen (5)
I believe the answer is:
story
'it may be written in pencil' is the definition.
The definition suggests a singular noun which matches the answer.
'or in pen' is the wordplay.
'in' indicates putting letters inside.
'pen' becomes 'sty' (both can mean an animal enclosure).
'or' going inside 'sty' is 'STORY'.
Can you help me to learn more?
(Other definitions for story that I've seen before include "Account, tale" , "See 10 and 19" , "Narration" , "Narrative or account" , "Rumour" .)