A resistor is not necessary if I understood your application correctly but post a schematic to remove any ambiguity.
And also, can I use the same digital pin to blink the LED and at the same time output the square wave?
Yes with the caveat output the square wave to what?
Well now I added a resistor and two diodes to the input. I read the article you wrote on your page, because the square wave input could be between -5v and more than 5v. I have no schematics.
The square wave from the "outside world" ideally should be 0-5v. The idea is that I could connect any clock signal from synthesizeres or so, like a Korg monotribe, monotron. But there are exceptions like a modular synth, which generally outputs a square wave of -5v to 5v. That's why I added your circuit.
The square wave output can go to any other sequencer/synthesizer, for example, this one from MFOS:
At the bottom of the schematic is U1-D 40106. XCLK is the clock input. So the square wave my Arduino generates, goes to that input.
I forgot to explain the project ... IT's a MIDI sequencer, now it can generate it's own clock and output MIDI clock to sync other instruments. It has MIDI in too, so with MIDI clock from other instruments it can be synced as slave.
The objective of the square wave input/ouput is the same as the MIDI clock in/out, but with analog instruments instead of digital. Because I have older hardware(modular synths) which doesn't have MIDI. So I want to be able to sync multiple digital and analog devices at the same time.