Bit confused re the "rubber surround that holds the bulb in place has corroded and broken off". Well if rubber will not corrode, but there is no rubber there. Here are some pictures..
View attachment 85354
This is the rear plastic cover that you remove to access the bulbs.
View attachment 85353
This is the headlight bulb in position with its wiring plug and retaining spring.
View attachment 85352
The headlight bulb in position with its spring but not electrically connected.
View attachment 85351
And with the bulb removed it sits on the grey plastic recess. This is an integral part of the headlight unit so if damaged you will need to replace the whole headlight unit.
Let us know which part you are talking about.