Can 12V relay be used instead of 5V relays?
No. You cannot. You can, however, use a 5V relay instead of a 12V relay as long as you put the appropriate resistor in series with the relay coil (so that the relay coil sees the same voltage across it and thus current through it that it normally needs).

What you are going to need to do (other than getting a 5V relay) is to re-design your circuit to accommodate the 12V relay which, depending on the circuit could be very simple or could be involved. You basically replace the 5V supply with a 12V supply and this causes a cascade of changes for everything that relies on the 5V supply in one way or another.