Answer:
The problems you described was most likely due to middle ear barotrauma ending in both alternobaric vertigo and in a luxation of the stapes into the oval window in the first case and in a simple episode of alternobaric vertigo in the second.
Both seem to have been precipitated by a certain difficulty in equalization during the dive.
To better explain: the stapes is one of the three tiny bones that transmit sound and vibration from the ear drum to the inner ear. The stapes is the last of the three ant its flat end lays into the oval window, one of the two membranous communicating ports between the middle and the inner ear. The other is called the round window.
Although not very common ( more common is indeed the rupture of the round window, and this is probably the risk the specialist you mention referred to ) the luxation of the stapes in the oval window (a displacement of the stapes ) may occur as a consequence of a faulty equalization and the inward bulging of the ear drum, pushing the stapes strongly into the oval window.
Any difference in the pressure conditions of the two middle and inner ear cavities generates vertigo, with possible nausea and vomiting and eventually hearing loss too ( this is called alternobaric vertigo).
In normal alternobaric vertigo the event is usually temporary and short-lived, like it happend to you the second time.
As for the first episode, what the instructor did was both very incorrect and very lucky.
In fact the first thing to be done in similar circumstances should have been to immediately seek for medical advice, without waiting for such a long time and leaving you suffering those serious and debilitating symptoms. In fact an inner ear serious problem should have been an easy diagnosis even for a non medically trained diving professional.
Taking you again underwater was incorrect as it might have easily worsened the problem leading to an irreversible rupture of middle and inner ear structures, but it was indeed extremely lucky in that, very likely, the pressure induced movement of the ear drum, possibly facilitated by the equalization attempts, generated a movement of the ossicle chain and a replacement of the stapes in its proper position.
As for the future, I would suggest a visit by an ENT specialist who has some experience in diving medicine. If there are no functional or anatomical defects in your middle and inner ear and if the function of the ear drum is normal, there is no reason why you should not dive, provided that you learn the equalization technique properly and you avoid diving when having a cold of any airway inflammation or infection.