What are the risks of improvising to use a nearby embedded metal as a local electrical ground?
Broadly speaking there are two main types of earthing system (there are also some others that are only used in specialised situations).
In a TN system the customer's earth is connected to the Neutral and the whole system is connected to the general mass of the earth in one or more places , this provides a low-impedance path for ground faults. TN systems can be divided into three subtypes, in a TN-S system the earth and neutral are kept seperate and only interconnected at a single point. In a TN-C system (now banned in most places) they are combined throughout the system. In a TN-C-S system they are combined in some but not all of the system (commonly they are combined in the suppliers wiring but not in the customer's wiring).
In a TT system the customer's earth and the supply neutral are seperately connected to the general mass of the earth. The issue with TT systems is that the earth fault loop impedance is usually pretty high. So TT systems nearly always have to rely on a RCD for earth fault detection.
Which systems are legal varies between countries, I have no idea what the rules in India are.
In addition to earthing there is also a concept of bonding, the aim of bonding is to ensure that different metal objects that someone can touch are at the same potential, even if the earthing system or the general mass of the earth has fault currents flowing through it. At least in the UK incoming metal water and gas pipes (and occasionally other things but these are by far the most common) are bonded to the electrical earthing system for this purpose.
Using a local earth then has two potential dangers.

It won't be a very good earth, it will almost certainly not be good enough for use without a RCD, it may or may not be good enough to use with a RCD, you can't be sure without testing it.
It won't be bonded to all the other earthed metalwork, so during a fault there could be a significant potential between your new earth and existing earths. Depending on how close together metalwork connected to different earthing systems is this could pose a hazard.