Can I make a rectifier to convert from AC to DC?
You can obviously build an AC to DC converter circuit. It does involve a bit more than a few diodes. Four diodes in a bridge circuit can turn the AC into pulsating DC. It will require a bulk storage capacitor to smooth this out into a DC voltage. You would apply this capacitor downwind from the diode bridge. Do note that an 18VAC transformer is rated as an RMS voltage and when you rectify that to DC and smooth with the storage capacitor the resulting voltage will be higher than the 18V level. The actual level you would see varies depending upon how much load current the supply would be delivering. For this reason it is often necessary to add a regulator downwind from the storage capacitor to produce the constant 18V DC output that you apparently need.