On thin ice means in a risky position where one more mistake means trouble. You are on thin ice, skating on thin ice, on very thin ice.
It is nearly always a warning from somebody with authority, and skating on thin ice is the fuller form. The image is exactly what it says: the surface holds until it does not.
1phraseon thin iceIn a risky position where one more mistake means trouble.
“You've been late three times this week, so you're on thin ice with the boss.”
on thin ice is a position.
Also accepted in games: skating on thin ice
From the image of skating on ice too thin to bear the weight.
Suggesting a person skating or walking on a frozen-over body of water, at risk of breaking through and falling into the water.
Etymology from Wiktionary, CC BY-SA
Practised in Idioms