Can you be put in a psych ward for self injury or for suicidal thoughts?

Hospitalization. Many people who have uncontrollable desires to self-harm or kill themselves find relief in being hospitalized. Such feelings can sometimes be extremely intense. Inpatient treatment can allow focused help in a protected environment that they don't have at home. Addressing painful issues can begin, with round-the-clock help. Discharge to ongoing outpatient treatment is possible afterwards.
In short, yes. If you are suicidal, all states have provisions for emergency hospitalization for you to get the help you need.