You can insert a a background colored shape over the line ends. In the next image I have a group of three blue rectangles. Two copies of it are filled with white and placed on the line ends:
Use as small rectangles as you want. Or use circles; they need no rotation when placed on a tilted line.
If you combine the gap-making shapes and the line to a group, it can be moved, scaled and rotated freely:
Unfortunately to change the line color or width one must ungroup it. And even more unfortunately, one can move separately the line ends, no matter the line was a part of a group.
Another workaround is to draw two lines - one dotted which is picked from Powerpoint's line type collection and another shorter with solid line type.
ADD: Consider to draw complex compositions in Inkscape (=freeware). There you most easily get it by splitting the line and let the end segments have a dashed stroke. In addition you get very useful snapping modes and numerous other crutches to put together what you need. Recent versions of PPt import SVG files as vectors which stay editable in PPt. See this: https://blogs.articulate.com/rapid-elearning/edit-svg-graphics-powerpoint/ SVG is the native format of Inkscape.
ADD2: Animations in PPt are shape movements and changing scalings or visibilities. One inserts them to items after they are in PPt and converted to PPt shape format (=not automatic). Consider Inkscape as a $0,00 shop where you purchase vector items that are too tough to draw in PPt. There's no way to define the forthcoming Powerpoint animation already in Inkscape.