I heard that based on the Shulchan Aruch Yoreh Deah #179, it is not allowed to say Tehillim for a sick person. Is this true?
It is permitted to say Tehillim for a sick person. What is forbidden is thinking as you are saying them that Tehillim are like penicillin for a strep infection: say two three times a day before meals and the sickness will go away. Tehillim is not magic. Appealing to G-d for help thru the word of King David is like prayer and is commendable. So is doing good deeds so that you will be more deserving of having your prayers answered (Shu"t Tzitz Eliezer XVII 30).