Update 3: For an arbitrary cropping region, for example
rp = RandomPoint[Rectangle @@ transpose[MinMax /@ Transpose[GraphEmbedding[g]]], 4];
region = BoundingRegion[rp, "FastEllipse"];
it is slow, but we get

Update 2: Rolling all steps into a function that returns a list of edges and vertices that intersect the input rectangle and a list of graphics primitives (points and portions of edges that lie in the input rectangle):
ClearAll[cropG]
cropG[g_, region_] := Module[{cTov = Thread[GraphEmbedding[g] -> VertexList[g]],
prims = Cases[Normal[Show[g][[1]]], _Arrow | _Disk, {0, ∞}] /.
{Disk[a_, _] :> Point[a],
Arrow[BezierCurve[b_, ___], _] :> Line[BezierFunction[b] /@ Subdivide[0, 1, 100]],
Arrow[c_, _] :> Line[c]},
primsToParts = {Line[a_] :> (UndirectedEdge @@ a[[{1, -1}]]), Point[b_] :> b}},
Transpose @ DeleteCases[{Replace[#, Join[cTov, primsToParts ], {0, ∞}],
RegionIntersection[region, #]} & /@ prims, {_, _EmptyRegion}]]
Examples:
cropG[g, rect][[1]]
{1 <-> 5, 2 <-> 5, 3 <-> 5, 4 <-> 5, 4 <-> 9, 4 <-> 12, 4 <-> 15,
4 <-> 16, 4 <-> 19, 5 <-> 11, 5 <-> 19, 5 <-> 20, 11 <-> 20,
12 <-> 20, 15 <-> 20, 4, 5}
cropG[g2, rect2][[1]]
{1 <-> 15, 1 <-> 19, 1 <-> 20, 2 <-> 15, 2 <-> 19, 3 <-> 17, 3 <-> 19,
3 <-> 20, 4 <-> 15, 4 <-> 19, 5 <-> 11, 5 <-> 19, 5 <-> 20,
6 <-> 17, 7 <-> 17, 8 <-> 20, 10 <-> 14, 10 <-> 19, 11 <-> 12,
11 <-> 13, 11 <-> 20, 12 <-> 20, 13 <-> 20, 14 <-> 15, 14 <-> 20,
15 <-> 20, 16 <-> 19, 17 <-> 20, 11, 15, 17, 19, 20}
Update: Getting all edges, edge portions and vertices that intersect the rectangle. (Borrowing/stealing the BezierFunction
idea from @Carl's answer to convert BezierCurve
s to Line
s)
SeedRandom[1];
g = RandomGraph[{20, 50}, VertexLabels->"Name"];
rect = Rectangle[{1.2, 0.2}, {2.2, 1.2}];
Show[g, Graphics[{EdgeForm[Red], FaceForm[None], rect}]]

vcToVertex = PropertyValue[{g, #}, VertexCoordinates] -> # & /@VertexList[g];
primitives = Cases[Normal[Show[g]], _Arrow|_Disk,{0, Infinity}] /.
{Disk[a_, _] :> Point[a],
Arrow[BezierCurve[x_,___],_] :> Line[BezierFunction[x]/@Subdivide[0, 1, 100]],
Arrow[y_,_]:>Line[y]};
primitivesInRectangle = DeleteCases[{Replace[#, Join[vcToVertex,
{Line[z_] :> (UndirectedEdge @@ z[[{1,-1}]]), Point[p_]:>p}], {0, ∞}],
RegionIntersection[rect, #]}& /@ primitives, {_,_EmptyRegion}];
portionsInRectangle = primitivesInRectangle[[All, 2]];
edgesAndVertices = primitivesInRectangle[[All, 1]]
{1 <-> 5, 2 <-> 5, 3 <-> 5, 4 <-> 5, 4 <-> 9, 4 <-> 12, 4 <-> 15,
4 <-> 16, 4 <-> 19, 5 <-> 11, 5 <-> 19, 5 <-> 20, 11 <-> 20, 12 <-> 20, 15 <-> 20,
4, 5}
Show[g, Graphics[{EdgeForm[Red], FaceForm[None], rect, Thick,
PointSize[.03], Blue, primitivesInRectangle[[All, 2]]}]]

Show[HighlightGraph[g, Style[#, Thick,Orange]& /@ edgesAndVertices],
Graphics[{EdgeForm[Red], FaceForm[], rect}]]

An example with curved edges:
SeedRandom[1];
g2 = RandomGraph[{20, 50}, VertexLabels->"Name", GraphLayout->"LayeredDigraphEmbedding"];
rect2 = Rectangle[{-5,-.5}, {.5, 2.5}];
Show[g2, Graphics[{EdgeForm[Red], FaceForm[None], rect2}]]

edgesAndVertices
:
{1 <-> 15, 1 <-> 19, 1 <-> 20, 2 <-> 15, 2 <-> 19, 3 <-> 17, 3 <-> 19,
3 <-> 20, 4 <-> 15, 4 <-> 19, 5 <-> 11, 5 <-> 19, 5 <-> 20,
6 <-> 17, 7 <-> 17, 8 <-> 20, 10 <-> 14, 10 <-> 19, 11 <-> 12,
11 <-> 13, 11 <-> 20, 12 <-> 20, 13 <-> 20, 14 <-> 15, 14 <-> 20,
15 <-> 20, 16 <-> 19, 17 <-> 20,
11, 15, 17, 19, 20}
Show[g2, Graphics[{EdgeForm[Red], FaceForm[None], rect2, Thick,
PointSize[.02], Blue, primitivesInRectangle[[All, 2]]}], ImageSize -> 500]

Show[HighlightGraph[g2, Style[#, Orange, Thick]& /@ edgesAndVertices],
Graphics[{EdgeForm[Red], FaceForm[None], rect2}], ImageSize -> 500]

Original answer:
A partial answer for the easier part of the requirements:
rect = Rectangle[{1.2, 0.2}, {2.2, 1.2}];
verticeInRect = Select[VertexList[g],
RegionMember[rect, PropertyValue[{g, #}, VertexCoordinates]] &];
g2 = Show[HighlightGraph[g, verticeInRect],
Graphics[{EdgeForm[Red], FaceForm[None], rect}]]

Show[g2, PlotRange->(Transpose[{##}]&@@rect), ImageSize->300]

Note: Show
produces a Graphics
object. To zoom on part of g
without turning g
into Graphics
, you can use
SetProperty[g, {PlotRange -> (Transpose[{##}] & @@ rect), ImageSize -> 300}]
