Yes. Modular and portable buildings — site cabins, welfare units, classrooms, offices, canteens, storage units and larger modular structures — can be funded, usually on hire purchase or lease. The key question a lender asks is whether the building stays relocatable or becomes part of the land it sits on.
A relocatable unit that can be lifted and moved is a far better proposition, because it can be recovered and resold. Once a building is set on permanent foundations, connected into mains services and effectively fixed to the property, many asset finance lenders lose interest — at that point it starts to look like a property matter rather than an equipment one, and different funding routes may be more appropriate.
Groundworks, craneage, delivery, connection of services, ramps and steps are often quoted alongside the unit. Some of these are soft costs that a lender will not fund, so check what is inside the agreement and what you need to pay for separately.
If you are buying units to hire out rather than to use yourself, say so at the outset — lenders assess hire-fleet purchases differently, and some will not do them at all. See the separate answer on financing equipment you intend to hire out.
Whichever route you take, missed payments can lead to the unit being recovered, which is disruptive if staff or pupils are working in it. Decisions rest with the lender.