Really, this should be a question for an Electrician in your area.
But, my 2c worth ...
Wiring for Lighting might have allowed 2-wire connections when your home was built. Non-lighting applications would require 3-wire (Hot, Neutral, Ground) wiring.
The NEC changed in 2011 to no longer allow that type of wiring for lighting, and now requires 3-wire with ground.
Again, you should really be asking an Electrician this, but as a rule of thumb you can *repair* electrical devices and wiring in your home yourself without a Permit and without a Licensed Electrician signing off on the permit. Basically means something like replacing a light switch with the exact same type of light switch, and similar kinds of repair.
You cannot *alter* electrical devices or wiring in your home yourself without having a Licensed Electrician either do the work or inspecting your work and signing off on a Permit. Basically means new installations, running new wire to the breaker box, installing new hard-wired (not plugged into a socket) devices, etc require an Electrician at some point on the job.
Broadly speaking a commercial Electrician would insist on doing the whole job anytime a Permit is required, but someone you know might agree to inspect and sign off. He is risking considerable liability if the job doesn't meet code so he will want to direct you on what must be done and how, so that you do it properly.
Generally speaking whenever you alter an electrical system in a home, you are required to bring it up to current Code. If you are only repairing, maybe not.