After posting the TSA information below, I noticed the ryanair tag. Here's what they have to say about sharp objects, emphasis added:
188.8.131.52 Pointed/edged Weapons & Sharp Objects; pointed or bladed articles capable of causing injury, including axes & hatchets, cleavers, arrows and darts, crampons (grappling iron, hooked bar of iron, or plate with iron spikes used in mountaineering), harpoons & spears, ice axes & ice picks, ice skates, knives with blades of more than 6 cms including lockable or flick knives, ceremonial, religious and hunting knives, made of metal or any other material strong enough to be used as a potential weapon, meat cleavers, machetes, open razors and blades (excluding safety or disposable razors with blades enclosed in cartridge), sabres, swords and swordsticks, scalpels, scissors with blades more than 6 cms as measured from the fulcrum, ski and walking/hiking poles, throwing stars, tradesman's tools with a blade or a shaft of more than 6 cms that have the potential to be used as a pointed or edged weapon, e.g.drills and drill bits, box cutters, utility knives, all saws, screwdrivers, chisels, crowbars, hammers, pliers, wrenches/spanners, blow torches.
I'll leave the TSA information in the answer to show that the basic approach is quite consistent from one country to the next.
According to the TSA, in carry-on luggage, you can bring
- Disposable razors
- Cartridge-type safety razor blades
- Non-cartridge safety razors without blades
You cannot bring non-cartridge disposable razor blades in the cabin, but they can be in your checked bags.
Other transportation safety authorities have similar rules. I once traveled from Europe to the US with a non-cartridge safety razor in my carry-on bag, but I left the blades behind because I did not want to check any luggage.