You cannot mix gelatin directly with oil because gelatin does not dissolve in oil.
Gelatin only dissolves in water and not oil.
However a common technique that is used is to dissolve some gelatin in a small amount of hot water and then mix the solution into some oil to clarify the oil by allowing the gelatin to trap any impurities as it solidifies when it's refrigerated.
In order to dissolve the gelatin needs water to dissolve as gelatin is a protein that only dissolves in polar solvents such as water and not in non polar liquids like oil.
To use gelatin to clarify oil.
Bring water to a simmer and then stir the gelatin until it dissolves in the water.
Next stir the gelatin and water vigorously and constantly and you can also pour the gelatin/water mixture into the dirty oil and it should look very cloudy and relatively homogeneous at this stage
Mix the gelatin solution into the used cooking oil.
Refrigerate the mixture.
As it solidifies, the gelatin also captures impurities, leaving you with cleaner, solidified oil.