ID3DXEffect::SetTexture() increases the reference count of any texture set on it, so yes - you'll need to set the texture to NULL if you want to Release() it.
EDIT: You should also be calling ID3DXEffect::OnLostDevice() and ID3DXEffect::OnResetDevice(), which probably internally sets the textures to NULL anyway.