Can a PhD student apply for another PhD program in some other university?
Yes, you can apply, just as anyone else. But yes, it is possible that people in your current program would take it as a negative. And, yes again, that the other university or program might rank you a bit lower if you already have a "suitable" position in a doctoral program. But I doubt that the last would be a large factor in most cases. 

But there are a lot of reasons to switch. Some of them are very important. If you have a serious need to switch, either for personal or academic reasons, don't hesitate to explore your options and follow up on good ones. This is especially true if you don't think  you have a good path to success where you are now. 

People understand that others change their minds and their directions. They understand the need to move locations and situations. They understand that some qualified students are in a bad situation.