I believe you can draw a clear line, and it is handled in a pretty decent way in the Mass Effect universe;
1. Forbid any sort of AI development (unless it is important), and make sure that the lesser intelligence you create can't evolve into anything more than what they were programmed for (no expansive memories).
2. Memory wipes don't necessarily kill a developing sentience, they make sure that it never comes about because it isn't supposed to. A droid that wasn't built to gain sentience or a higher intelligence needs memory wipes, and if they don't then you get a "rampant" AI situation (IG-88, and I remember a few droids in KOTOR2 that seemed to have a form of sentience that were basically nuts).
3. If a droid claims sentience, then there must be a series of tests to decide whether this is true or not (the droid could have been programmed to say it had sentience). If it fails then memory wipe it and put it back to work, if it passes then it should be studied so that other droids can be prevented from doing so, then either dismantled if it is potentially dangerous or allowed to exist in a limited perimeter.
I disagree on some points:
1. I see no reason for this. Are sentient droids more dangerous than organic sentients? Of course, if it is forbidden to create sentients in general, than AIs have to be included.
2. That's a difficult point. Imagine a droid did gain sentience, but you memory-wipe it, you basically destroy a sentient. On the other hand, no memory-wipes could also lead to errors which produce a dangerous but non-sentient droid. I'm not sure how to handle this.
3. Which tests would you perform to determine if a droid is sentient?
I firmly disagree on this: "...if it passes then it should be studied so that other droids can be prevented from doing so, then either dismantled if it is potentially dangerous or allowed to exist in a limited perimeter."
If it is sentient, the same rights apply to it, as to organic sentients. You cannot simply kill a Wookie, because he is potentielly dangerous, so dismanteling a sentient droid shouldn't be allowed either. Same for the limited perimeter: The same thing has been done to sentients, but it isn't considered morally right. Even studying the droid should depend on his permission.