Looking at the source code, the cheat menu doesn't actually allow you to attack a castle on your own. You can start a siege on your own via the cheat menu, but you will not be able to perform the actual attack. For that, you need at least 3 soldiers:
("castle_lead_attack",
[
(neg|troop_is_wounded, "trp_player"),
(ge, "$g_siege_method", 1),
(gt, "$g_friend_fit_for_battle", 3),
(store_current_hours, ":cur_hours"),
(ge, ":cur_hours", "$g_siege_method_finish_hours"),
],
"Lead your soldiers in an assault.",
("attack_stay_back",
[
(ge, "$g_siege_method", 1),
(gt, "$g_friend_fit_for_battle", 3),
(store_current_hours, ":cur_hours"),
(ge, ":cur_hours", "$g_siege_method_finish_hours"),
],
"Order your soldiers to attack while you stay back...",
So, what we can conclude is that this is not possible without modding.
What you can do, in this case, is edit the menus.txt file. Make a backup first!
mno_castle_start_siege 13 1073742365 3 144115188075856273 54 -1 541 3 144115188075856273 54 648518346341351424 2190 3 1224979098644774912 144115188075856787 432345564227567630 2147483678 2 1224979098644774912 0 2147483678 2 144115188075856786 1 1 2 936748722493063353 648518346341351424 32 2 72057594037927936 5 4 0 541 3 144115188075856273 0 3 2133 2 72057594037927942 1 5 0 2133 2 72057594037927942 0 3 0 Besiege_the_{reg6?town:castle}.
edit to
mno_castle_start_siege 13 1073742365 3 144115188075856273 54 -1 541 3 144115188075856273 54 648518346341351424 2190 3 1224979098644774912 144115188075856787 432345564227567630 2147483678 2 1224979098644774912 0 2147483678 2 144115188075856786 1 1 2 936748722493063353 648518346341351424 32 2 72057594037927936 0 4 0 541 3 144115188075856273 0 3 2133 2 72057594037927942 1 5 0 2133 2 72057594037927942 0 3 0 Besiege_the_{reg6?town:castle}.
That's a one character change - a 5 into a 0, and it corresponds to changing the 5 into a 0 here:
("castle_start_siege",
[
(this_or_next|party_slot_eq, "$g_encountered_party", slot_center_is_besieged_by, -1),
( party_slot_eq, "$g_encountered_party", slot_center_is_besieged_by, "p_main_party"),
(store_relation, ":reln", "$g_encountered_party_faction", "fac_player_supporters_faction"),
(lt, ":reln", 0),
(lt, "$g_encountered_party_2", 1),
(call_script, "script_party_count_fit_for_battle","p_main_party"),
(gt, reg(0), 5),
(try_begin),
(party_slot_eq, "$g_encountered_party", slot_party_type, spt_town),
(assign, reg6, 1),
(else_try),
(assign, reg6, 0),
(try_end),
],
"Besiege the {reg6?town:castle}.",
You're setting the "party_count_fit_for_battle" requirement from "more than 5" to "more than 0". This will allow you to start the siege on your own.
As for actually allowing the siege: Menus.txt again, this time for mno_castle_lead_attack
:
mno_castle_lead_attack 5 2147485156 1 360287970189639680 30 2 144115188075856225 1 32 2 144115188075856836 3 2270 1 1224979098644774912 30 2 1224979098644774912 144115188075856229 Lead_your_soldiers_in_an_assault.
This needs to be edited to
mno_castle_lead_attack 5 2147485156 1 360287970189639680 30 2 144115188075856225 1 32 2 144115188075856836 -1 2270 1 1224979098644774912 30 2 1224979098644774912 144115188075856229 Lead_your_soldiers_in_an_assault.
This changes the "3" for the (gt, "$g_friend_fit_for_battle", 3),
which validates if you have more 3 soldiers into a "-1" - "at least 0 soldiers". With these two changes, you should be able to (theoretically) besiege a castle on your own.