Yes you can...
There are two function that will behave exactly like user-typed input:
property TextBetweenPoints[aStartPoint, aEndPoint: TPoint]: String
property TextBetweenPointsEx[aStartPoint, aEndPoint: TPoint; CaretMode: TSynCaretAdjustMode]: String
for example
TextBetweenPoints[ Point(1,7), Point(5,7)] := '123';
replaces the first 4 chars on line 7 (1-based, so that's index 6 for Lines[6]).
TextBetweenPoints[ Point(1,7), Point(1,7)] := '123';
Inserts the text at the start of line 7
It marks the text as modified, it's undo-able.
It keeps the caret at it's current position. That means the caret may end up at a different char in the text, if it was at line 7. Because the numerical value for the caret position did not change, but the text was moved.
TextBetweenPointsEx[ Point(1,7), Point(5,8), scamAdjust] := '123';
replaces line 7, and the 1st 4 chars of line 8. So the text will have one line less.
If the caret was behind the edited text, it will move with the text
TSynCaretAdjustMode = ( // used in TextBetweenPointsEx
scamIgnore, // Caret stays at the same numeric values, if text is inserted before caret, the text moves, but the caret stays
scamAdjust, // Caret moves with text, if text is inserted
scamEnd, // move caret to end of inserted text
scamBegin // move caret to begin of inserted text
);