Can my school refuse to give me my transcript if I owe fees?

It depends on state law, whether you attend a public or private school, and possibly your school's policies.

Federal law does not prevent schools from requiring payment before providing you with an official transcript.

However, in California and some other states, schools cannot refuse to provide your transcript on the grounds that you owe a debt. (CA Education Code § 66022).