Diesel additive spill. Odor elimination
To get the smell out of your washing machine and rug you have to do two things 

1.) Get the source of the smell into the water and 
2.) Keep it in the water for flushing.

To get it into the water I suggest using dish soap. Dish soap is far more design to handle the greasy materials you listed and will dissolve them better than regular laundry detergent.  The draw back to this is that dish soap will form foam quite readily which laundry detergent is formulated not to do. If you have a top loading washer this can cause suds to over flow your washer.  You may obfuscate this issue by monitoring and adding rubbing alcohol as needed to suppress the suds. If front loading washer you do not need to monitor but it will take a long time, as these machines can sense suds and will wait for the suds to die down before restarting. I also suggest using LA's Awesome as it is a very effective degreaser and uses limonene (orange oil) as an emulsifier.

To keep the smell in the water I suggest activated charcoal  which can be bought for use in aquarium filters.  This will absorb the petro-chemicals and carry them away.  I suggest you use activated charcoal after a first attempt with the prior suggest method of soap and degreaser as charcoal can coat your drier affecting the next load or two, but washing a rag can help clean it out.

One of the comments mentions scaling as a possible issue.  LA's awesome has chealating agents and this should be of no issue.  If you choose to etch some scale I would suggest vinegar for this over citric acid.