Will 2x4 remain straight?
As the temperature and humidity change, it will tend to warp again.  But, if it's securely fastened to the other fence components, that will help to keep it straight.  If it was only a tiny bit warped, you're probably just fine using it.  But if the warp was a really bad one, it could do interesting things to the fence as it reverts to its old shape.