If this AI was within the operating parameters of Data on ST, then Yes.
This debate was done in many episodes of that fiction and should we ever attain that level of AI, then we have to consider it as a life form.
Same for if we ever encounter extraterrestrial forms of life that may not resemble ours (Including a possibility of AI). If a machine is sentient, knows its own mortality and acts to preserve itself then it may be time to afford it rights.
Just because this is all supposition, never discount that it goes beyond possibility.