No, you can't use a part centerline to define a datum as shown in your examples. The datum feature symbol must be associated with a particular feature, or features.
As stated above, you can't have a datum symbol attached to a non-touchable center. There are a couple of reasons, but the main one is that we don't know exactly what center is being referred to: Is it the center plane derived from the outside width? Inside width? Middle plane of the holes' location? And so on.
John-Paul Belanger
Certified Sr. GD&T Professional
Geometric Learning Systems
You sure will ask why I can't use the center line as a datum feature, here is the answer for you. Even ISO GPS not allow the datum symbol place on the center line on the new standard.