Historically , have any countries ever been invaded by another state if it was known that they possess nuclear weapons ?
Your "1 ICBM" question is not really a historical question, it's a strategic question. The answer isn't simple. Is a single ICBM enough to establish credible deterrence? Most strategists would say "no," because your enemy would be very tempted to just destroy your single ICBM first (one way or another), or shoot it down, or hope it would fail, because there is a non-zero failure rate associated with such things.
OK, let's imagine this hypothetical ICBM is 100% accurate, 100% reliable, and 100% guaranteed to reach its target. Would it be enough to deter? It depends what it is deterring. If it's aimed at something your enemy values (e.g., their biggest city), it is probably enough to deter against a lot of things. But remember that deterrence works both ways: your enemy is probably threatening you. Would they be willing to lose one city if it got them their strategic aims? Depends on your enemy, depends on the situation. It is of note that the US and USSR both risked nuclear war several times in the name of their strategic interests, even though the other side had hundreds if not thousands of ICBMs. So most deterrence theorists would say, "that's probably not enough," but deterrence is a psychological state, so it's going to depend on the specific people involved. When asked about safe "low numbers" for deterrence, the numbers states and theorists tend to go with are in the hundreds, though maybe one could imagine the dozens. But one is pretty small for that.
For your invasion question, the Soviet Union and the People's Republic of China did have a series of serious border clashes and incursions in 1969. One also has the case of the Falklands war, in which the sovereign territory of the United Kingdom was violated by a non-nuclear state (Argentina).