Yes it is posible. The area around the med center is not bad. There may be some shady looking areas further down stockton blvd but even thats not that bad in my opinion. There are some nice neighbourhoods behind the med center withink walking distance but those are mainly residential and i've never seen apartments there (i could be wrong).
You could live downtown and bike to the med center. As downtowns go, sacramento may have the least downtown-looking downtown of a major city.
The housing is not too bad but in my opinion, its not great either.
you could also check out the Pocket/greenhaven neighbourhood. Its probably one of the nicer reasonably priced areas in sac. Unfortunately, its a little further out and you may have to hop on a bus or lightrail if you live out there.
Theres a light rail station down the street from the med center and a shuttle that runs between the med center and light rail so its not too bad.
Some people also choose to live in davis. there is a shuttle that runs hourly between the 2 campuses. I think the fare for this is $1 each way and its a 40 min ride.
Overall, theres only a couple places in sac that i would consider a little bit unsafe for a student to live in. For those places, you'll be able to tell as soon as you see it. So dont worry about getting tricked into living in a place that looks ok but turns out to be a crappy place to stay.
Also, this area may be one of the best for people that prefer to bike to school/work.
Hope this helps.