Can a state prison transfer an inmate to a federal prison?

Yes. Prisoners are often housed and moved between county, state, and federal institutions according space availability, contracts for providing services, etc.