I think you may be confusing Basic Med with No Medical At All, some operations do not require any sort of medical exam
(b)Operations not requiring a medical certificate. A person is not
required to hold a medical certificate -
(1) When exercising the privileges of a student pilot certificate
while seeking -
(i) A sport pilot certificate with glider or balloon privileges; or
(ii) A pilot certificate with a glider category rating or balloon
class rating;
...
(8) When taking a practical test or a proficiency check for a
certificate, rating, authorization or operating privilege conducted in
a glider, balloon, flight simulator, or flight training device; or
Basic med can be accepted if you comply with the Basic Med regulations. However you need at least one valid medical (that can be expired) to be eligible for basic med, since a Class III medical is valid for 5 years (under the age of 40) its more than likely your training will be accomplished before it expires and thus you will have a valid medical when you sit for your check ride.
The FAA address this in this Q/A document
Q17: Do student pilots need to hold a medical certificate when they go
for their private pilot checkride?
A: Individuals who are new to
aviation will need to get one medical certificate if they want to fly
under BasicMed. After that, they can fly under BasicMed forever, as
long as they fly a BasicMed-compliant aircraft and never fly for
compensation or hire. Most student pilots will still hold their first
medical certificate when they apply for their private pilot
certificate.
To trace the legislation exactly:
As you note for some student pilot operations as per 61.23
(c)Operations requiring either a medical certificate or U.S. driver's license.
...
(v) Exercising the privileges of a student,
recreational or private pilot certificate if the flight is conducted
under the conditions and limitations set forth in §61.113(i); or
This would potentially allow it but sends you over to 61.113(i) for more info
61.113 Private pilot privileges and limitations: Pilot in command.
...
(i) A private pilot may act as pilot in command of an aircraft without
holding a medical certificate issued under part 67 of this chapter
provided the pilot holds a valid U.S. driver's license, meets the
requirements of §61.23(c)(3), and complies with this section and all
of the following conditions and limitations:
which just bounces you right back to §61.23(c)(3) one section down from where we were earlier
...
(3) A person using a U.S. driver's license to meet the requirements of
paragraph (c) while operating under the conditions and limitations of
§ 61.113(i) must meet the following requirements -
(i) The person must -
(A) Comply with all medical requirements or restrictions associated
with his or her U.S. driver's license;
(B) At any point after July 14, 2006, have held a medical certificate
issued under part 67 of this chapter;
So at some point you will need to get at least one medical. Most students do this along with either student pilot certificate (allowing them to fly solo) furthermore most complete their training within 5 years of that date although there are other cases. For example, you started your training in early 2006, got you class III medical/student pilot on July 15th of 2006 which is good for 5 years. Life gets in the way and you stop training for a while. Your medical expires in 2011 but you now decide to get back into the left seat. Since you never lost your medical and once held a valid medical you are legal to fly and train under basic med (and even sit for a check ride).