This all depends on the location.
In the United States they are still legal for off road use only. They can not be ridden on the street and can not be made street legal.
Usually when the government does something like this they will not completely ban the use of 2 strokes. They will ban dealers from selling new models. But they will not ban the use of models currently owned by consumers.