That was my first thought too, but I was put off by the fact that it's a thing "pour écrire", which struck me more as "a thing for writing (with)" than "a thing that I can write" (which I would imagine would be more likely "un truc à ecrire", though I have no idea if that's grammatical). Finally all these bloody prepositions are actually being useful.
I haven't heard it for awhile, but in English there is the familiar expression "thing-a-ma-jig" or "thing-a-ma-bob" which is used, at least in parts of the United States, when you momentarily forget the name of something or you don't actually know its name. "Give me that thing-a-ma-jig over there". One might say this when asking for a tool while working on a machine. "Truc" can be used the same way, I think.
The act of writing requires several tools, a pen, paper and table (optional). Can the truc refer to something other than the pen?
Something to write with refers to the pen (or pencil etc). Something to write on would refer to the paper.
This rather informal French sentence doesn't explicitly refer to "with" or "on". Though I haven't tried to enter "I need something to write on." Would this translation also be correct?
Yes, it sure can. When I lived in France, "truc" was one of my best friends, haha. It could be used for any "thing"... maybe a great description would be calling something a "truc" when you don't know what else to call it... or, you need a pencil or a pen or a crayon, a "whatever"...just some THING to write with... "truc" says this perfectly.